mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add Keybindings for some Markdown Toolbar Actions (#17198)
* Add Keybindings for some markdown toolbar * add extension registry * when in text cell stopPropagation to only trigger one command
This commit is contained in:
@@ -137,6 +137,18 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
|
||||
const urlToOpen: string = 'https://aka.ms/localized-BDC-book';
|
||||
await vscode.commands.executeCommand('vscode.open', vscode.Uri.parse(urlToOpen));
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.boldText', async () => {
|
||||
await appContext.notebookUtils.toggleMarkdownStyle('bold');
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.italicizeText', async () => {
|
||||
await appContext.notebookUtils.toggleMarkdownStyle('italic');
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.underlineText', async () => {
|
||||
await appContext.notebookUtils.toggleMarkdownStyle('underline');
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.codeBlock', async () => {
|
||||
await appContext.notebookUtils.toggleMarkdownStyle('formatBlock', false, 'pre');
|
||||
}));
|
||||
|
||||
controller = new JupyterController(appContext);
|
||||
let result = await controller.activate();
|
||||
|
||||
Reference in New Issue
Block a user