From 0686be2d686b367868eb349a77b73a02f308a680 Mon Sep 17 00:00:00 2001 From: Kelani Tolulope Date: Tue, 16 Jan 2024 11:38:26 +0100 Subject: [PATCH] Fix unsaved changes alert from triggering when RTE is empty --- lib/vue/src/components/input/CRichTextInput/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vue/src/components/input/CRichTextInput/index.vue b/lib/vue/src/components/input/CRichTextInput/index.vue index c04b391e5..f0451e27d 100644 --- a/lib/vue/src/components/input/CRichTextInput/index.vue +++ b/lib/vue/src/components/input/CRichTextInput/index.vue @@ -98,7 +98,9 @@ export default { init () { this.editor = new Editor({ extensions: this.formats, - content: this.value, + // Bypass Editor default empty white space script with an empty space string if there is no value because it's not really valid html + // also ensuring that the unsaved changes alert detection is not triggered when the Editor does not have any changes + content: this.value || ' ', parseOptions: { preserveWhitespace: 'full', },