From d2414a2d06e051e0189fd93f512e45af9303dce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 30 Jan 2019 09:05:08 +0100 Subject: [PATCH] pass extension options to node views as prop --- README.md | 1 + packages/tiptap/src/Utils/ComponentView.js | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 5df60bab..12756563 100644 --- a/README.md +++ b/README.md @@ -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: { diff --git a/packages/tiptap/src/Utils/ComponentView.js b/packages/tiptap/src/Utils/ComponentView.js index b8e67857..9a99f99d 100644 --- a/packages/tiptap/src/Utils/ComponentView.js +++ b/packages/tiptap/src/Utils/ComponentView.js @@ -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), },