-import {updateViewLanguage} from "./views";
-
+import {updateViewLanguage} from './views';
export class SimpleEditorInterface {
+
/**
* @param {EditorView} editorView
*/
* @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},
});
}
setMode(mode, content = '') {
updateViewLanguage(this.ev, mode, content);
}
-}
\ No newline at end of file
+
+}