pass extension options to node views as prop
This commit is contained in:
@@ -408,6 +408,7 @@ export default class IframeNode extends Node {
|
|||||||
// `node` is a Prosemirror Node Object
|
// `node` is a Prosemirror Node Object
|
||||||
// `updateAttrs` is a function to update attributes defined in `schema`
|
// `updateAttrs` is a function to update attributes defined in `schema`
|
||||||
// `editable` is the global editor prop whether the content can be edited
|
// `editable` is the global editor prop whether the content can be edited
|
||||||
|
// `options` is an array of your extension options
|
||||||
// `selected`
|
// `selected`
|
||||||
props: ['node', 'updateAttrs', 'editable'],
|
props: ['node', 'updateAttrs', 'editable'],
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export default class ComponentView {
|
|||||||
decorations: this.decorations,
|
decorations: this.decorations,
|
||||||
editable: this.editable,
|
editable: this.editable,
|
||||||
selected: false,
|
selected: false,
|
||||||
|
options: this.extension.options,
|
||||||
updateAttrs: attrs => this.updateAttrs(attrs),
|
updateAttrs: attrs => this.updateAttrs(attrs),
|
||||||
updateContent: content => this.updateContent(content),
|
updateContent: content => this.updateContent(content),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user