Closed overbost closed 3 months ago
@axolo Worth to fix:
watch(
() => props.content,
(newContent) => {
if (!quill || !newContent || internalModelEquals(newContent)) return 👈👈👈👈👈
// Restore the selection and cursor position after updating the content
const selection = quill.getSelection()
if (selection) {
nextTick(() => quill?.setSelection(selection))
}
setContents(newContent)
},
{ deep: true }
)
This problem makes it impossible to use it within a form. It is not possible to check whether the content is empty
try this to check if content is empty
function isEmpty(value: string) { return value.replace(/<(.|\n)*?>/g, "").trim().length === 0; }
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Version @vueup/vue-quill 1.2.0
Describe the bug When content is empty string, the quill content is not updated. The content is on the previous state I must use
this.$refs.quillEdtor.setHTML("")
To Reproduce Steps to reproduce the behavior:
Expected behavior The content should setted to empty
Additional context I think there is a bug on the code