Merge pull request #6620 from Abassion/master

Fix #5606: Adding support for Quill V2
pull/6798/head
Tuğçe Küçükoğlu 2024-11-13 15:16:46 +03:00 committed by GitHub
commit eab946c088
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
<div class="card">
<Editor v-model="value" editorStyle="height: 320px" />
</div>
<DocSectionCode :code="code" :dependencies="{ quill: '1.3.7' }" component="Editor" />
<DocSectionCode :code="code" :dependencies="{ quill: '2.0.0' }" component="Editor" />
</template>
<script>

View File

@ -5,7 +5,7 @@
<div class="card">
<Editor v-model="value" editorStyle="height: 320px" readonly />
</div>
<DocSectionCode :code="code" :dependencies="{ quill: '1.3.7' }" component="Editor" />
<DocSectionCode :code="code" :dependencies="{ quill: '2.0.0' }" component="Editor" />
</template>
<script>

View File

@ -13,7 +13,7 @@
</template>
</Editor>
</div>
<DocSectionCode :code="code" :dependencies="{ quill: '1.3.7' }" component="Editor" />
<DocSectionCode :code="code" :dependencies="{ quill: '2.0.0' }" component="Editor" />
</template>
<script>

View File

@ -46,7 +46,7 @@
"postcss": "^8.4.31",
"prettier": "2.7.1",
"primeicons": "^7.0.0",
"quill": "^1.3.7",
"quill": "2.0.0",
"sass": "1.45.0",
"sass-loader": "8.0.2",
"tailwindcss": "^3.4.1",

View File

@ -124,7 +124,7 @@ export default {
methods: {
renderValue(value) {
if (this.quill) {
if (value) this.quill.setContents(this.quill.clipboard.convert(value));
if (value) this.quill.clipboard.dangerouslyPasteHTML(value);
else this.quill.setText('');
}
},