refactoring
This commit is contained in:
@@ -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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user