冬日暖阳 前言 今天在写前端的时候,就是遇到一个问题。一开始我以为用textarea去掉角标,实现自动增长,然后就可以了。谁知道它还得加样式,加粗、斜体,老师在最开始给的设计稿上根本没有。直接麻掉。 后来就去搞这个富文本编辑器。感觉前端也不容易,要学习的东西真的蛮多。 功能需求是这
showSource() { let _this = this _this.isHTML = !_this.isHTML let _source = this.editor.getHTML() if (_this.isHTML) { _source = _source.replace(/</g, "<").replace(/>/g, ">").replace(/ /g,
介绍 vue + tiptap + elementUI 封装的开箱即用tiptap编辑器 github仓库:https://github.com/font-size/vue-tiptap-wrap npm地址:https://www.npmjs.com/package/vue-tiptap-wrap 安装 npm i vue-tiptap-wrap 在页面中使用 import tiptap from 'vue-tiptap-wrap' <tiptap v-mo