refactoring

This commit is contained in:
Philipp Kühn
2020-03-04 21:23:18 +01:00
parent ca21f69da1
commit 8633404cc3
6 changed files with 7 additions and 10 deletions

View File

@@ -8,10 +8,6 @@ import {addListNodes} from "prosemirror-schema-list"
// @ts-ignore
import {exampleSetup} from "prosemirror-example-setup"
import insertText from './commands/insertText'
import insertHTML from './commands/insertHTML'
import focus from './commands/focus'
import elementFromString from './utils/elementFromString'
type EditorContent = string | JSON
@@ -39,9 +35,9 @@ export class Editor {
constructor(options: EditorOptions) {
this.options = options
this.view = this.createView()
this.registerCommand('focus', focus)
this.registerCommand('insertText', insertText)
this.registerCommand('insertHTML', insertHTML)
this.registerCommand('focus', require('./commands/focus').default)
this.registerCommand('insertText', require('./commands/insertText').default)
this.registerCommand('insertHTML', require('./commands/insertHTML').default)
}
get state() {