大家好,又见面了,我是你们的朋友全栈君。
很长时间没有写学习心得了,整理了一下思路,简单写一下吧。
1下载kindeditor包,目前最新版本是kindeditor-3.5.5。
2.解压之后,解压目录kindeditor如下图所示。
3.开始瘦身,其实调用kindeditor并不需要那么多文件,只要保留目录:plugins、skins和文件kindeditor3.5.5.js即可。其余的文件均可删除。
4,把瘦身后的目录kindeditor拷贝到Web工程的WebRoot下面,然后打开kindeditor3.5.5.js,设置skinsPath和pluginsPath两个属性,值分别为/kindeditor/skins,/kindeditor/plugins。
5 页面调用
(1)首先引入kindeditor3.5.5.js文件
(2) 在要调用编辑器的文件中建立textArea标签,如:<textarea id=”editor” name=”editor” style=”width:502px;height:197px;visibility:hidden;” ></textarea>
(3) 调用KE对象的show()方法。如:KE.show({ id : ‘editor’, resizeMode : 1, allowPreviewEmoticons : false, allowUpload : false, items : [ ‘source’, ‘|’, ‘fontname’, ‘fontsize’, ‘|’, ‘textcolor’, ‘bgcolor’, ‘bold’, ‘italic’, ‘underline’, ‘removeformat’, ‘|’, ‘justifyleft’, ‘justifycenter’, ‘justifyright’, ‘insertorderedlist’, ‘insertunorderedlist’, ‘|’, ’emoticons’, ‘image’, ‘link’] });
注意:这里的id属性值与<textarea>标签的id属性值相同。
(4)大功告成,访问你的页面吧!
转载于:https://www.cnblogs.com/seeking/p/3286418.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/182802.html原文链接:https://javaforall.cn