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:
Kaan Genç
2021-11-03 21:49:44 +00:00
committed by GitHub
parent ce9c6361dc
commit 1aa9a712d1

View File

@@ -99,7 +99,7 @@
"editor/title": [
{
"command": "markdown.showPreviewToSide",
"when": "editorLangId == markdown && !notebookEditorFocused",
"when": "editorLangId == markdown && !notebookEditorFocused && !hasCustomMarkdownPreview",
"alt": "markdown.showPreview",
"group": "navigation"
},