首页 > 代码库 > 在线编辑器KindEditor的使用
在线编辑器KindEditor的使用
1、官网下载:点击进入
2、解压后目录说明
├── asp asp示例 ├── asp.net asp.net示例 ├── attached 空文件夹,放置关联文件attached ├── examples HTML示例 ├── jsp java示例 ├── kindeditor-all-min.js 全部JS(压缩) ├── kindeditor-all.js 全部JS(未压缩) ├── kindeditor-min.js 仅KindEditor JS(压缩)不包含plugins的JS代码 ├── kindeditor.js 仅KindEditor JS(未压缩)不包含plugins的JS ├── lang 支持语言 ├── license.txt License ├── php PHP示例 ├── plugins KindEditor内部使用的插件 └── themes KindEditor主题
3、使用样例
- 页面添加textarea标签
<textarea id="editor_id" name="content" style="width:700px;height:300px;"> </textarea>
-
在页面添加如下脚本
<script charset="utf-8" src="/editor/kindeditor.js"></script> <script> KE.show({ id : ‘editor_id‘ }); </script>
- 获取编辑器的内容
//取得HTML内容 html = KE.html(‘editor_id‘); //同步数据后可以直接取得textarea的value KE.sync(‘editor_id‘); html = document.getElementById(‘editor_id‘).value; html = $(‘#editor_id‘).val(); //jQuery //设置HTML内容 KE.html(‘editor_id‘, ‘HTML内容‘);
在线编辑器KindEditor的使用
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。