vueup / vue-quill

Rich Text Editor Component for Vue 3.
https://vueup.github.io/vue-quill/
MIT License
1.13k stars 282 forks source link

v-model:content two-way binding still not working properly #336

Closed cortnum closed 1 year ago

cortnum commented 1 year ago

Version @vueup/vue-quill version 1.1.0

Describe the bug This still doesn't work as it should.

I have a case, where I have multiple text editors spawned in a for loop. And when I insert one in the middle with an empty model value (''), and the component which renders the editor updates, the texteditor still has the text from the previous model value inside. If I insert one in the middle, which HAS a model value (eg. '.'), it works as expected.

It seems there is a problem when the model value was set to an empty string, that doesn't update the text you see on the screen. But the content value of the editor updates just fine.

To Reproduce

  1. make a v-for loop based on an array of strings that renders at least two quillEditors, which have text inside them.
  2. insert a new empty string in your array, don't insert it at the end of the array, it has to be before another element
  3. the newly inserted string will render a quillEditor which has the text of the next string in the array inside the editor.

Expected behavior I expect the newly added quillEditor to be empty, just like the string that is the model-value for the element

Reproduction link If available, add a link to the source code to help explain your problem.

Browser (please complete the following information):

makerovski commented 1 year ago

Hello .. Can you share your code, let me take a look on it

stale[bot] commented 1 year ago

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.