set parent component for vue node views
This commit is contained in:
@@ -252,9 +252,7 @@ export class Editor extends EventEmitter {
|
||||
|
||||
this.view.updateState(newState)
|
||||
|
||||
this.view.setProps({
|
||||
nodeViews: this.extensionManager.nodeViews,
|
||||
})
|
||||
this.createNodeViews()
|
||||
|
||||
// Let’s store the editor instance in the DOM element.
|
||||
// So we’ll have access to it for tests.
|
||||
@@ -262,6 +260,15 @@ export class Editor extends EventEmitter {
|
||||
dom.editor = this.proxy
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates all node views.
|
||||
*/
|
||||
public createNodeViews() {
|
||||
this.view.setProps({
|
||||
nodeViews: this.extensionManager.nodeViews,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a ProseMirror document.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user