X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/69d03042c6f40c617ad6ffceb5fdd95f8610d383..HEAD:/resources/js/code/simple-editor-interface.js diff --git a/resources/js/code/simple-editor-interface.js b/resources/js/code/simple-editor-interface.js index 6e94ca767..63456cdc3 100644 --- a/resources/js/code/simple-editor-interface.js +++ b/resources/js/code/simple-editor-interface.js @@ -1,7 +1,7 @@ -import {updateViewLanguage} from "./views"; - +import {updateViewLanguage} from './views'; export class SimpleEditorInterface { + /** * @param {EditorView} editorView */ @@ -22,9 +22,9 @@ export class SimpleEditorInterface { * @param content */ setContent(content) { - const doc = this.ev.state.doc; + const {doc} = this.ev.state; this.ev.dispatch({ - changes: {from: 0, to: doc.length, insert: content} + changes: {from: 0, to: doc.length, insert: content}, }); } @@ -43,4 +43,5 @@ export class SimpleEditorInterface { setMode(mode, content = '') { updateViewLanguage(this.ev, mode, content); } -} \ No newline at end of file + +}