surmon-china / vue-quill-editor

@quilljs editor component for @vuejs(2)
https://github.surmon.me/vue-quill-editor
MIT License
7.38k stars 1.03k forks source link

v-model doesn't accept delta #417

Open nstringham opened 4 years ago

nstringham commented 4 years ago

Vue.js version and component version

vue@2.6.12 vue-quill-editor@3.0.6

Reproduction Link

jsFiddle

Steps to reproduce

set v-modal to a Delta object

What is Expected?

a two-way binding

What is actually happening?

nothing

ntgnst commented 3 years ago

Delta not works in v-model. If you want two way binding you should use straight string as v-model.

Two-way Binding Example

Also check this in code:

....
<div>
        <div class="output ql-snow">
          <div class="title">Output</div>
        <div class="ql-editor" v-html="content"></div>
      </div>
....
data() {
    return {
      content: ''
    }
  },