Allow extensions to disable built-in markdown preview button by SeriousBug · Pull Request #136273 · microsoft/vscode (original) (raw)

Adds a flag for the "Open Preview to the Side" button displayed for markdown files. This makes it possible for extensions to hide this button when desired by setting the flag to true. For example, extensions can now use the following line to disable the preview button:

vscode.commands.executeCommand("setContext", "hasCustomMarkdownPreview", true);

Issue: #136388

Regularly:

With the default markdown preview button disabled by an extension: