pass extension options to node views as prop

This commit is contained in:
Philipp Kühn
2019-01-30 09:05:08 +01:00
parent 9aace5a283
commit d2414a2d06
2 changed files with 2 additions and 0 deletions

View File

@@ -408,6 +408,7 @@ export default class IframeNode extends Node {
// `node` is a Prosemirror Node Object
// `updateAttrs` is a function to update attributes defined in `schema`
// `editable` is the global editor prop whether the content can be edited
// `options` is an array of your extension options
// `selected`
props: ['node', 'updateAttrs', 'editable'],
computed: {

View File

@@ -36,6 +36,7 @@ export default class ComponentView {
decorations: this.decorations,
editable: this.editable,
selected: false,
options: this.extension.options,
updateAttrs: attrs => this.updateAttrs(attrs),
updateContent: content => this.updateContent(content),
},