1、引用 wangEditor 相关js 和 css
下载地址:https://files.cnblogs.com/files/kitty-blog/WangEditor.zip
3、页面:
<div id="editor"> </div>
2、初始化编辑器:
//初始化编辑器 function editor_init() { var E = window.wangEditor; var editor = new E(\'#editor\'); editor.customConfig.linkCheck = function (text, link) { //校验链接地址 if (isValidatedUrl(link)) { return true; } else { return \'连接无效\'; } }; editor.customConfig.linkImgCheck = function (text, link) { //校验图片链接地址 if (isValidatedUrl(link)) { return true; } else { return \'图片连接无效\'; } }; //自定义emoji 表情(微信) editor.customConfig.emotions = [ { title: \'