Typescript vue3在编辑器本身内将羽毛笔增量转换为html
我想使用vue3 typescript将羽毛笔增量转换为html 我使用了模块quill html编辑按钮,但它显示的是弹出窗口而不是弹出窗口。我想在编辑器中实现它。目前,我正在使用quill detlta to html将增量操作转换为html字符串,但无法在html上插入它Typescript vue3在编辑器本身内将羽毛笔增量转换为html,typescript,vue.js,quill,delta,Typescript,Vue.js,Quill,Delta,我想使用vue3 typescript将羽毛笔增量转换为html 我使用了模块quill html编辑按钮,但它显示的是弹出窗口而不是弹出窗口。我想在编辑器中实现它。目前,我正在使用quill detlta to html将增量操作转换为html字符串,但无法在html上插入它 <QuillEditor toolbar="#mytoolbar" v-model:content="editorContent" > <template #t
<QuillEditor
toolbar="#mytoolbar"
v-model:content="editorContent"
>
<template #toolbar>
<div id="mytoolbar" >
<button @click="getRawHtml"></button>
</div>
</template>
</QuillEditor>
<script>
import { QuillDeltaToHtmlConverter } from "quill-delta-to-html";
// inside setup function
setup(){
const editorContent = ref({})
const getRawHtml = () => {
let converter = new QuillDeltaToHtmlConverter(editorContent.value.ops,{})
let html = converter.convert()
editorContent.value.insert(html) // this is inserting but changes are displaying
}
}
</script>
从“quill delta到html”导入{QuillDeltaToHtmlConverter};
//内部设置功能
设置(){
const editorContent=ref({})
常量getRawHtml=()=>{
let converter=new-quilldeltagothtmlconverter(editorContent.value.ops,{})
让html=converter.convert()
editorContent.value.insert(html)//这是插入,但显示更改
}
}