Vue2 封装的 Quill 富文本编辑器组件 Vue-Quill-Editor
1、安装
npm install vue-quill-editor --save
2、使用
import { quillEditor } from 'vue-quill-editor'
3、组件中
<quill-editor v-model="content"
ref="myQuillEditor"
class="editer"
:options="editorOption"
@ready="onEditorReady($event)">
</quill-editor>
data(){
return {
content: '<h3>文本编辑</h3>',
editorOption: {
}
}
},
components: {
NavHeader,
quillEditor,
},
computed: {
editor() {
return this.$refs.myQuillEditor.quill
}
},
methods: {
onEditorReady(editor) {
console.log('editor ready!', editor)
},
submit(){
console.log(this.content);
this.$message.success('提交成功!');
}
}
这样就已经完成了,但是有的时候在页面中 这样之后,样式会全部乱掉解决办法
main.js 中
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import VueQuillEditor from 'vue-quill-editor' Vue.use(VueQuillEditor);
Vue2 封装的 Quill 富文本编辑器组件 Vue-Quill-Editor的更多相关文章
- Quill 富文本编辑器
Quill 富文本编辑器 https://quilljs.com/ https://github.com/quilljs/quill https://github.com/quilljs/awesom ...
- Vue整合Quill富文本编辑器
Quill介绍 Quill是一款开源的富文本编辑器,基于可扩展的架构设计,提供丰富的 API 进行定制.截止2021年1月,在github上面已有28.8k的star. Quill项目地址:https ...
- 如何对富文本编辑器(FCK Html Editor)的工具栏进行扩展?
我们在项目开发过程中,会经常使用到富文本编辑器.GeneXus内置的富文本编辑器FCK Html Editor使用起来非常方便,只要将页面变量的控件类型(Control Type)选择为FCK Htm ...
- 轻量级quill富文本编辑器
因为公司产品需要在移动端编辑文本,所以发现了这个轻量级的好东西,网上也没找到比较好的案例,就自己总结了下,有兴趣的直接复制代码运行看看就知道啦! 下面是quill.js的CDN加速地址: <!- ...
- quill富文本编辑器 API
//1. 从第三个开始删除,删除4个 // console.log(this.quill.deleteText(2, 4)); // 12345678 1278 // 2.(返回对象)返回从第三个开始 ...
- 基于 React-draft-wysiwyg 实现的 react 富文本编辑器组件 开箱即用
工作中遇到了一个需要做图文详情 的富文本编辑的需求, 于是基于 React-draft-wysiwyg 实现了一个 纯组件, 目前支持 常规文本输入 外部链接图片 以及本地上传图片, 由于是纯组件, ...
- ckeditor5富文本编辑器在vue中的使用
安装依赖: npm install --save @ckeditor/ckeditor5-vue @ckeditor/ckeditor5-build-classic 要创建编辑器实例,必须首先将编辑器 ...
- 现代富文本编辑器Quill的内容渲染机制
DevUI是一支兼具设计视角和工程视角的团队,服务于华为云DevCloud平台和华为内部数个中后台系统,服务于设计师和前端工程师.官方网站:devui.designNg组件库:ng-devui(欢迎S ...
- Vue CLI 3+tinymce 5富文本编辑器整合
基于Vue CLI 3脚手架搭建的项目整合tinymce 5富文本编辑器,vue cli 2版本及tinymce 4版本参考:https://blog.csdn.net/liub37/article/ ...
随机推荐
- VNC Server Installation on CentOS 6.5
In my case I have a fresh installed CentOS6.5 Server on which I will be installing the VNC-server so ...
- nyoj_289_苹果_20140307
苹果 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 ctest有n个苹果,要将它放入容量为v的背包.给出第i个苹果的大小和价钱,求出能放入背包的苹果的总价钱最大值. ...
- Spring MVC-视图解析器(View Resolverr)-内部资源视图解析器(Internal Resource View Resolver)示例(转载实践)
以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_internalresourceviewresolver.htm 说明:示例基于S ...
- PHP中JSON的应用
文章来源:PHP开发学习门户 地址: http://www.phpthinking.com/archives/513 互联网的今天,AJAX已经不是什么陌生的词汇了.说起AJAX,可能会马上想起因R ...
- ios 使用Starscream实现websocket简单例子
调试了半天,出现 websocket is disconnected: Invalid HTTP upgrade 的错误 居然是 URL 地址写错了的原因,端口号之后还有一堆地址没有写上. 另外wss ...
- Ext.tree.Panel实现单选,多选
Extjs var productCategoryTreeLookUpFn = function(callback) { var productCategoryLookUpWindow; var pr ...
- 蒟蒻的trie树专题
POJ 3630 Phone List: 模板 ///meek #include<bits/stdc++.h> using namespace std; using namespace s ...
- bzoj2132: 圈地计划(无比强大的最小割)
2132: 圈地计划 题目:传送门 简要题意: 给出一个矩阵,一共n*m个点,并给出三个收益矩阵.A矩阵表示这个点建A的可取收益,B矩阵表示这个点建B的可取收益,C矩阵表示如果相邻(有且仅有一条公共边 ...
- yrzl-cloud
- Shredding Company(dfs)
http://poj.org/problem?id=1416 题意:将一个数分成几部分,使其分割的各个数的和最大并且小于所给的数. 凌乱了..参考的会神的代码..orz... #include < ...