KindEditor配置和使用
2013-11-21 16:16
176 查看
1下载kindeditor包,目前最新版本是kindeditor-3.5.5。下载地址:http://www.kindsoft.net/
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)大功告成,访问你的页面吧
来自转载!
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)大功告成,访问你的页面吧
来自转载!
相关文章推荐
- 华为交换机命令
- srping security
- Squid 启动/停止/重载配置文件 命令
- 存在多个版本jdk配置问题
- android电源管理
- 给 VS2008 / VS2010 MFC 项目添加启动画面
- 金山笔试
- TLB 转换检测缓冲区
- DP之花店橱窗布置
- 一步一步学android控件(之十六)—— CheckBox
- Spring的PropertyPlaceholderConfigurer应用
- 偏导,方导,梯度,散度,旋度
- win7电脑磁盘文件如何以分组的方式展现附图
- Extjs4循序渐进(二)—Ext的界面(容器和布局)
- 偏导,方导,梯度,散度,旋度
- C++中extern “C”含义深层探索
- 从三个方面进行讲解如何适当优化"SQL"
- 驱动总结之mmap函数实现
- 【Arcgis android】 离线编辑实现及一些代码段
- 实验10 指针2