Hello guys,
I got this problem right now as described on topic ? What should I config in addition ?
Thx for your help.
Tell us about your environment
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
What actually happened? Please include the actual, raw output from ESLint.
Why should it be supported?
Okey, @Kocal I'll give you a specific example : while I tried to integrate the quill editor the way SSR :
https://github.com/surmon-china/vue-quill-editor
<div class="quill-editor"
v-model="content"
v-quill:myQuillEditor="editorOption">
</div>
Linter warned me as usual and do you please suggest a better solution to figure it out ?
Thx :)
Oh, I thought that v-model was specific to custom components and to some <input> tags.
Maybe you can use this?
<!-- eslint-disable-next-line vue/valid-v-model -->`
<div class="quill-editor"
v-model="content"
v-quill:myQuillEditor="editorOption">
</div>
Sorry, seems that doesnt work for me. Any solution else ?
v-model is just a syntactic sugar, and shouldn't be used on elements other than input or textarea.
You should instead manually control data flow, like this:
<div
v-quill:myQuillEditor="editorOption"
:content="content"
class="quill-editor"
@change="onEditorChange($event)" />
The $event parameter on @change contains three objects.
text is where you can get your content as a plain text.
html is where you can get your content as HTML.
quill is an object that has to do with Quill API? I'm not very sure and haven't dived.
For people who don't know how to sync data, just do this.
onEditorChange($event) {
this.content = $event.html
}
In that way you can get your HTML inside content.
Most helpful comment
Oh, I thought that
v-modelwas specific to custom components and to some<input>tags.Maybe you can use this?