<script src="/editor/kindeditor.js"></script>
<script src="/editor/lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="jianjie"]', {
allowFileManager : true ,
//设置编辑器为简单模式
items : [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
//下面这行代码就是关键的所在,当失去焦点时执行 this.sync();
afterBlur:function(){this.sync();}
});
});
<script src="/editor/lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="jianjie"]', {
allowFileManager : true ,
//设置编辑器为简单模式
items : [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
//下面这行代码就是关键的所在,当失去焦点时执行 this.sync();
afterBlur:function(){this.sync();}
});
});
</script>
<textarea style="width:100%; height:340px" name="jianjie" id="jianjie"><?=$my[jianjie]?></textarea>