mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-25 08:09:59 +08:00
@ -563,6 +563,12 @@ class MarkdownEditor {
|
||||
this.cm.setCursor(cursorPos.line + prependLineCount, cursorPos.ch);
|
||||
});
|
||||
|
||||
// Insert editor content at the current location
|
||||
window.$events.listen('editor::insert', (eventContent) => {
|
||||
const markdown = getContentToInsert(eventContent);
|
||||
this.cm.replaceSelection(markdown);
|
||||
});
|
||||
|
||||
// Focus on editor
|
||||
window.$events.listen('editor::focus', () => {
|
||||
this.cm.focus();
|
||||
|
Reference in New Issue
Block a user