diff --git a/src/editor.js b/src/editor.js index bf699d2702..3710e958b5 100644 --- a/src/editor.js +++ b/src/editor.js @@ -119,6 +119,11 @@ class TextEditorEmbed { return this } + updateReadonlyBarProps(value) { + this.#vm.$set(this.#data, 'readonlyBarProps', value) + return this + } + insertAtCursor(content) { this.#getEditorComponent().$editor.chain().insertContent(content).focus().run() } @@ -174,6 +179,7 @@ window.OCA.Text.createEditor = async function({ const data = Vue.observable({ showOutlineOutside: false, + readonlyBarProps: readonlyBar.props, readOnly, content, }) @@ -205,7 +211,7 @@ window.OCA.Text.createEditor = async function({ ? { readonlyBar: () => { return h(readonlyBar.component, { - props: readonlyBar.props, + props: data.readonlyBarProps, }) }, }