Skip to content

Instantly share code, notes, and snippets.

@GrandSchtroumpf
Created May 7, 2020 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GrandSchtroumpf/653bb4985d7470090ecafcf71eb7c4f4 to your computer and use it in GitHub Desktop.
Save GrandSchtroumpf/653bb4985d7470090ecafcf71eb7c4f4 to your computer and use it in GitHub Desktop.
Markdium-VSCode extension inside a nx workspace
import { commands, ExtensionContext, window, ViewColumn } from 'vscode';
// On activation
export function activate(context: ExtensionContext) {
// Register command "start"
commands.registerCommand('start', () => {
const panel = window.createWebviewPanel(
'studio', // Key used to reference the panel
'Studio', // Title display in the tab
ViewColumn.Active, // Editor column to show the new webview panel in.
{ enableScripts: true });
panel.webview.html = 'Hello World';
context.subscriptions.push(panel);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment