在Vue里面使用wangeditor编译器,如何获取到内容?
2018-05-23 14:41
134 查看
1:使用npm下载:
//(注意 wangeditor 全部是小写字母) npm install wangeditor
- 1
- 2
import E from 'wangeditor'
- 1
<div id="editorElem" style="text-align:left"></div> <button v-on:click="getContent">查看内容</button>
- 1
- 2
export default { name: 'editor', data () { return { editorContent: '' } }, methods: { getContent: function () { alert(this.editorContent) } }, mounted() { var editor = new E('#editorElem') editor.customConfig.onchange = (html) => { this.editorContent = html } editor.create() } }
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
https://github.com/wangfupeng1988/wangEditor/blob/master/README.md阅读更多
相关文章推荐
- C#里面如何利用流获取一个记事本内容的行数
- GridView使用技巧之:如何在RowCommand里获取模板列里绑定的内容?
- 黄聪:C#里如何使用WebBrowser获取处理AJAX生成的网页内容?
- 黄聪:C#里如何使用WebBrowser获取处理AJAX生成的网页内容?
- 如何使用Properties来获取文件内容
- 【代码】获取https里面内容的方法和技巧使用php
- 如何使用python自动登录路由器且获取页面内容
- vue使用watch 观察路由变化,重新获取内容
- vue如何使用 Slot 分发内容实例详解
- 使用JS获取表单元素里面的内容
- 如何使用php自动获取文章内容关键字
- GridView使用技巧之:如何在RowCommand里获取模板列里绑定的内容?
- 如何使用curl获取网页内容
- 【vue】——使用watch 观察路由变化,重新获取内容
- android 里面 如何使用gson 快速获取类的所有字段名称,包括父类的
- 在对话框中使用CTreeCtrl控件时,在OnNMClick消息中如何获取选中的Item以及内容
- strut2 optiontransferselect 标签使用如何在action中获取list和doublelist里面的数据
- Vue中如何使用vue-resource获取端口数据
- PHP中使用curl库获取网页内容如何P…
- sql 存储过程没有写传出参数如何获取里面的内容