KindEditor插件生成编辑工具
来源:互联网 发布:网络语言9代表什么意思 编辑:程序博客网 时间:2024/06/05 00:20
首先,必须先引进所有KindEditor插件的文件:
如:
<link href="<%=basePath%>resources/scripts/plugins/kingeditor/themes/default/default.css" el="stylesheet" type="text/css" />
<link rel="stylesheet" href="resources/scripts/plugins/kingeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="resources/scripts/plugins/kingeditor/plugins/code/prettify.js"></script>
<script charset="utf-8" src="resources/scripts/plugins/kingeditor/kindeditor.js"></script>
<script charset="utf-8" src="resources/scripts/plugins/kingeditor/lang/zh_CN.js"></script>
代码如下:
<body>
<div style="height:90%;width:100%;padding-top:5px;">
<form name="example" method="post" action="demo.jsp">
<textarea id="area" name="content" cols="100" rows="8" style="width:640px;height:320px;visibility:hidden;"></textarea>
</form>
</div>
<script type="text/javascript">
mini.parse(); //mini.parse() 把html标签解析成miniui控件对象。
KindEditor.ready(function(K) {
var editor= K.create('textarea[name="content"]', {
cssPath : 'resources/scripts/plugins/kingeditor/plugins/code/prettify.css',
allowFileManager : true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
document.forms['example'].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
document.forms['example'].submit();
});
},
items : [
'fontname', 'fontsize', '|','undo','redo','|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', 'table','|', 'link','unlink']
});
});
</script>
</body>
- KindEditor插件生成编辑工具
- 在线文档编辑插件——KindEditor
- KindEditor编辑
- KindEditor插件
- 富编辑文本框KindEditor
- kindeditor-网页文字编辑
- 关于Kindeditor编辑
- Unity3D自定义资源文件编辑工具插件
- kindeditor添加插件
- kindeditor 插件开发
- KindEditor 自定义插件
- 富文本插件 KindEditor
- joomla!的kindeditor插件
- KindEditor插件的使用
- KindEditor上传图片插件
- kindeditor自定义插件
- jQuery插件kindeditor注意事项
- kindeditor插件实现编辑器
- Android 链接https出现 javax.net.ssl.SSLException: hostname in certificate didn't match:
- Emacs配置颜色主题
- arm-linux-gcc下载与安装
- 虚拟化之QEMU与KVM
- slidingmenu学习总结
- KindEditor插件生成编辑工具
- 算法导论 笔记
- CityEngine Web Viewer IIS 部署
- myeclipse 在线更新 spket
- GROUP BY规则
- thrift 网络结构说明
- Android JNI 编译正确 但是提示程序有错误无法运行 而且还看不到任何错误提示 的解决方法
- C# MVC 自学笔记—2 MVC Movie简介
- Arduino and the SPI bus