kindeditor-4.1.7--- 文本编辑器
来源:互联网 发布:淘宝自动关闭订单软件 编辑:程序博客网 时间:2024/05/16 07:39
引用实例
<script language="JavaScript" type="text/javascript" src="include/kindeditor-4.1.7/kindeditor-min.js"></script>
include 为项目根目录文件
<textarea name="content" style="width:400px;height:240px;visibility:hidden;">KindEditor</textarea>
{literal}
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
//items:["image", "multiimage"] //控制当前页面显示的可用按钮,全部可以去kindeditor-min.js设置items数组可设置全局,当前页面不设 //置,默认全局items数组
//下面这行代码就是关键的所在,当失去焦点时执行 this.sync();
afterBlur:
function
(){
this
.sync();}
});
});
</script>
{/literal}
js获取输入域内值 直接调用当前页面 var editor变量,此变量也默认为当前页面的已知变量,不用再var,直接调用
类本例获取:
editor.html
后台获取 转义 htmlspecialchars($_POST【'content'】)
http://www.stepday.com/topic/?670
http://www.it163.org/post/118fd1_878ec8
保存入库时htmlspecialchars()函数处理,数据读出显示时htmlspecialchars_decode()处理
==================================来发例子
<textarea name="shop_content" style="width:500px;height:300px;"><?php echo is_array_set($basic, 'shop_content');?></textarea>
<textarea name="product_return" style="width:500px;height:300px;"><?php echo is_array_set($basic, 'product_return');?></textarea>
<script src='/assets/javascripts/jquery/jquery.min.js' type='text/javascript'></script>
<!-- / kindeditor -->
<script src="/assets/javascripts/plugins/kindeditor-4.1.10/kindeditor-all-min.js"></script>
<script src="/assets/javascripts/plugins/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
K.create('textarea[name="shop_content"]', {
autoHeightMode : true,
items:[
'source', '|', 'undo', 'redo', '|', 'cut', 'copy', 'paste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent',
'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'table', 'hr','pagebreak',
],
afterCreate : function() {
this.loadPlugin('autoheight');
}
});
});
</script>
<script>
KindEditor.ready(function(K) {
K.create('textarea[name="product_return"]', {
autoHeightMode : true,
items:[
'source', '|', 'undo', 'redo', '|', 'cut', 'copy', 'paste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent',
'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'table', 'hr','pagebreak',
],
afterCreate : function() {
this.loadPlugin('autoheight');
}
});
});
</script>
0 0
- kindeditor-4.1.7--- 文本编辑器
- 配置KindEditor文本编辑器
- kindeditor文本编辑器使用
- kindeditor富文本编辑器
- 使用kindeditor文本编辑器
- kindeditor 文本编辑器
- kindeditor文本编辑器
- 【JavaScript】KindEditor在线文本编辑器
- KindEditor在线文本编辑器使用
- 网页文本 编辑器 KindEditor NicEditor
- Kindeditor文本编辑器基本配置
- kindeditor富文本编辑器配置
- kindeditor-4.1.10文本编辑器多个绑定
- Html编辑器,富文本编辑器KindEditor使用
- 两款富文本编辑器:NicEdit和Kindeditor
- 两款富文本编辑器:NicEdit和Kindeditor
- [原] 开源HTML文本编辑器--KindEditor
- 推荐两款富文本编辑器:NicEdit和Kindeditor
- 了解iOS上的可执行文件和Mach-O格式
- 四种方案解决ScrollView嵌套ListView问题
- 行人检测(综述2)
- 二维数组中的查找
- 开源项目网站推荐
- kindeditor-4.1.7--- 文本编辑器
- Linux Makefile生成*.d依赖文件及 gcc -M -MF -MP等相关选项说明
- Spring+SprinMVC配置学习总结
- 进入页面立即调用该页面上用户控件ascx中方法
- ThinkPHP3.2.3建立项目模板和模板赋值
- 设计模式_状态模式
- ttl值设置多少才合适
- 自定义listview实现下拉刷新的效果
- How can I prevent SQL-injection in PHP?