h5 富文本编辑器


第一种:wangEditor(地址:https://www.kancloud.cn/wangfupeng/wangeditor3/332599)

首先需要引入js

  其次在页面中定义  
  然后在js中     var E = window.wangEditor     var editor = new E('#editor')     // 或者 var editor = new E( document.getElementById('editor') )     editor.create()       console.log(editor.txt.text())//获取富文本编辑器的值   第二种:ueditor (最新版地址:http://ueditor.baidu.com/website/download.html#ueditor) 百度网盘中有   第一步:引入文件   第二步:html文件   第三步:js         //实例化编辑器         var ue = UE.getEditor('editor', {             initialFrameWidth: 800,             initialFrameHeight: 400,             autoFloatEnabled: false,             autoHeightEnabled: false,             elementPathEnabled: false,             enableAutoSave: false         });
H5