From 63df50b6e020f3fa8f7f14530d3d38a67a2c10c9 Mon Sep 17 00:00:00 2001 From: Kadir Boylu Date: Thu, 23 Nov 2023 12:42:00 +0300 Subject: [PATCH] fix readonly prop's does not react to change --- components/lib/editor/Editor.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/lib/editor/Editor.vue b/components/lib/editor/Editor.vue index 39dbcc749..7648d8dde 100755 --- a/components/lib/editor/Editor.vue +++ b/components/lib/editor/Editor.vue @@ -75,6 +75,9 @@ export default { this.reRenderColorKey++; this.renderValue(newValue); } + }, + readonly() { + this.handleReadOnlyChange(); } }, mounted() { @@ -165,6 +168,9 @@ export default { if (this.quill && this.quill.getModule('toolbar')) { this.$emit('load', { instance: this.quill }); } + }, + handleReadOnlyChange() { + if (this.quill) this.quill.enable(!this.readonly); } } };