Command markdown.showSource
shows the source code of a markdown preview, how to write the When
condition so that markdown.showSource
only triggers when the active editor is indeed a markdown preview?
"when": "markdownPreviewFocus"
How did I find this? (With a markdown preview editor open)
Toggle the Help/Developer Tools On, go to its console.
Start the command Developer: Inspect Context Keys
I just clicked anywhere in vscode. In the developer tools console, you will get a long list of active context keys. I searched for preview
and there were a few but this one looked really promising and it worked!