Beautiful Open-Source Form Builder
Enhance RichTextAreaInput and Quill Patches for Improved Functionality
JhumanJ990eca9e522d
diff --git a/client/components/forms/RichTextAreaInput.client.vue b/client/components/forms/RichTextAreaInput.client.vueindex be16f4010..9b97fab2e 100644--- a/client/components/forms/RichTextAreaInput.client.vue+++ b/client/components/forms/RichTextAreaInput.client.vue@@ -132,7 +132,17 @@ const quillOptions = computed(() => {['link'],[{ list: 'ordered' }, { list: 'bullet' }],[{ color: [] }],- ]+ ],+ keyboard: {+ bindings: {+ tab: {+ key: 9,+ handler (range) {+ this.quill.insertText(range.index, ' ', 'user')+ }+ }+ }+ }}}diff --git a/client/lib/quill/quillPatches.js b/client/lib/quill/quillPatches.jsindex 3811237b0..2155d470a 100644--- a/client/lib/quill/quillPatches.js+++ b/client/lib/quill/quillPatches.js@@ -12,8 +12,9 @@ import Quill from 'quill'// Apply fixes:return html- // 1. Replace with regular spaces- .replace(/ /g, ' ')+ // 1. Replace double with a non-breaking and a regular space.+ // This preserves spacing while allowing wrapping, fixing overflow issues.+ .replace(/ /g, ' ')// 2. Fix line breaks by replacing empty paragraphs with paragraphs containing <br/>.replace(/<p><\/p>/g, '<p><br/></p>')}