Added callout cycling in markdown editor via shortcut

This commit is contained in:
Dan Brown
2022-11-26 23:18:51 +00:00
parent 8e4bb32b77
commit 3fdb88c7aa
2 changed files with 40 additions and 2 deletions

View File

@ -40,7 +40,7 @@ export function provide(editor, metaKey) {
shortcuts[`${metaKey}-7`] = cm => editor.actions.wrapSelection('\n```\n', '\n```');
shortcuts[`${metaKey}-8`] = cm => editor.actions.wrapSelection('`', '`');
shortcuts[`Shift-${metaKey}-E`] = cm => editor.actions.wrapSelection('`', '`');
shortcuts[`${metaKey}-9`] = cm => editor.actions.wrapSelection('<p class="callout info">', '</p>');
shortcuts[`${metaKey}-9`] = cm => editor.actions.cycleCalloutTypeAtSelection();
shortcuts[`${metaKey}-P`] = cm => editor.actions.replaceLineStart('-')
shortcuts[`${metaKey}-O`] = cm => editor.actions.replaceLineStartForOrderedList()