refactoring

This commit is contained in:
Philipp Kühn
2021-03-15 18:42:58 +01:00
parent 57915d8638
commit 9bc68d6d85

View File

@@ -53,10 +53,6 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
return return
} }
// this.setState({
// editor,
// })
const element = this.editorContentRef.current const element = this.editorContentRef.current
element.appendChild(editor.options.element.firstChild) element.appendChild(editor.options.element.firstChild)
@@ -67,10 +63,8 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
editor.contentComponent = this editor.contentComponent = this
// TODO: why setTimeout? // TODO: alternative to setTimeout?
setTimeout(() => { setTimeout(() => editor.createNodeViews(), 0)
editor.createNodeViews()
}, 0)
} }
} }