我是男性网站,用户可以在其中建立网站简介。 用户如何从mywebsite可以自定义文本和样式,如粗体,着色等?
leecomezhou 回答:如何制作自定义文字和样式
您需要使用https://github.com/scrumpy/tiptap之类的优质所见即所得编辑器
您可以像这样进行基本设置
<template>
<editor-content :editor="editor" />
</template>
<script>
// Import the editor
import { 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>