KindEditor编辑器的使用
2016-01-26 00:43
351 查看
1.下载KindEditor编辑器 以KindEditor 4.1.10为例.
2.将下载解压完的KindEditor文件夹放在__ROOT__中.
3.在thinkphp中的Index/index.html中添加以下代码:
2.将下载解压完的KindEditor文件夹放在__ROOT__中.
3.在thinkphp中的Index/index.html中添加以下代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Document</title> <load href="__ROOT__/kindeditor-4.1.10/kindeditor-min.js"/> //加载kindeditor <script> KindEditor.ready(function(K) { window.editor = K.create('.editor',{ width:'500px', //kindeditor样式 height:'300px', //uploadJson :'__ROOT__/kindeditor-4.1.10/php/upload_json.php', //图片上传参数(1). //fileManagerJson :'__ROOT__/kindeditor-4.1.10/php/file_manager_json.php', //图片上传参数(2). allowFileManager : true, resizeType:2, //2或1或0,2时可以拖动改变宽度和高度,1时只能改变高度,0时不能拖动。 items : [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright' ] //功能图标 }); }); </script> </head> <body> <div style="margin-left:50px"> <textarea name="content" class="editor"></textarea> </div> </body> </html>
相关文章推荐
- Baby-Step Giant-Step 解高次同余方程(形如(a^x)%n=b,其中n为素数)
- Codeforces-Round #340 解题报告
- 一个开源Delphi分类组件推荐网页
- export 原理解析 (Shell Script)
- js获取网页高度(详细整理)
- JNA调用DLL一点小结
- Linux私房菜阅读笔记
- 如何阅读别人写的项目
- 顺序表的增删改查实现
- Priority Queue Implementation
- 1-25
- win10系统下360加速球不显示网速解决方法
- HDU 4415 - Assassin’s Creed
- 前端基础之CSS
- win10如何使用miphone刷机工具
- HDU-1013 Digital Roots
- 构建现实机器学习系统的其他10点经验(二)
- 传智播客168期JavaEE就业班(第一天 html)
- 正式发表--java学习第二天,变量等信息。
- 20160123.CCPP详解体系(0002天)