蝴蝶不菲
您需要使用好的所见即所得编辑器,例如https://github.com/scrumpy/tiptap你可以像这样进行基本设置<template> <editor-content :editor="editor" /></template><script>// Import the editorimport { Editor, EditorContent } from 'tiptap'export default { components: { EditorContent, }, data() { return { editor: null, } }, mounted() { this.editor = new Editor({ content: '<p>This is just a boring paragraph</p>', }) }, beforeDestroy() { this.editor.destroy() },}</script>