Added button for inserting attachment link to a page

For #1460
This commit is contained in:
Dan Brown
2020-09-13 18:58:05 +01:00
parent ad48cd3e48
commit 09c6d6c722
5 changed files with 31 additions and 1 deletions

View File

@ -401,6 +401,11 @@ function listenForBookStackEditorEvents(editor) {
editor.setContent(content);
});
// Insert editor content at the current location
window.$events.listen('editor::insert', ({html}) => {
editor.insertContent(html);
});
// Focus on the editor
window.$events.listen('editor::focus', () => {
editor.focus();