+
+ // 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();
+ });