]> BookStack Code Mirror - bookstack/blobdiff - resources/js/code/simple-editor-interface.js
fix typo
[bookstack] / resources / js / code / simple-editor-interface.js
index 6e94ca767566235dff2904bf443b7c6384786b71..63456cdc3643065e0bfc08dd59ba0d15d491800b 100644 (file)
@@ -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
+
+}