Got md shortcuts working, marked actions for update

This commit is contained in:
Dan Brown
2023-04-11 11:48:58 +01:00
parent 572037ef1f
commit da3e4f5f75
5 changed files with 84 additions and 48 deletions

View File

@ -45,7 +45,7 @@ export class MarkdownEditor extends Component {
window.$events.emitPublic(this.elem, 'editor-markdown::setup', {
markdownIt: this.editor.markdown.getRenderer(),
displayEl: this.display,
// TODO
// TODO - change to codeMirrorView?
// codeMirrorInstance: this.editor.cm,
});
}
@ -58,7 +58,7 @@ export class MarkdownEditor extends Component {
if (button === null) return;
const action = button.getAttribute('data-action');
if (action === 'insertImage') this.editor.actions.insertImage();
if (action === 'insertImage') this.editor.actions.showImageInsert();
if (action === 'insertLink') this.editor.actions.showLinkSelector();
if (action === 'insertDrawing' && (event.ctrlKey || event.metaKey)) {
this.editor.actions.showImageManager();