mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Allow extensions to disable built-in markdown preview button (#136273)
* Allow extensions to disable built-in markdown preview button
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:
```js
vscode.commands.executeCommand("setContext", "hasCustomMarkdownView", true);
```
* update keyword for disabling default markdown preview
This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
"editor/title": [
|
||||
{
|
||||
"command": "markdown.showPreviewToSide",
|
||||
"when": "editorLangId == markdown && !notebookEditorFocused",
|
||||
"when": "editorLangId == markdown && !notebookEditorFocused && !hasCustomMarkdownPreview",
|
||||
"alt": "markdown.showPreview",
|
||||
"group": "navigation"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user