mycurelabs / vue-wysiwyg

A simple wysiwyg editor for Vue.js
https://mycurelabs.github.io/vue-wysiwyg/
MIT License
51 stars 13 forks source link

Two editors on one page look at the same vue model #23

Open IvanNikolaychuk opened 3 years ago

IvanNikolaychuk commented 3 years ago

Hi,

When I have two editors on one page both are looking at the same model. For example, I have: <mc-wysiwyg v-model="entities.newEntity.header"></mc-wysiwyg> and <mc-wysiwyg v-model="entities.newEntity.footer"></mc-wysiwyg>

Despite having different models, second editor (footer) takes the value from the first editor (header).

How can I fix that?

gllanasnas commented 2 years ago

Hi,

When I have two editors on one page both are looking at the same model. For example, I have: <mc-wysiwyg v-model="entities.newEntity.header"></mc-wysiwyg> and <mc-wysiwyg v-model="entities.newEntity.footer"></mc-wysiwyg>

Despite having different models, second editor (footer) takes the value from the first editor (header).

How can I fix that?

Same error

qiuzman commented 1 year ago

I have this same bug. I had to add a v-if to each editor if not present on at the same time. If you need both present at the same time I believe you are out of luck.

mmarquez commented 1 year ago

I've created a fork to resolve this. I'm currently testing the functionality.