//js文件
layer.open({
type: 2,
title: '添加协议',
shadeClose: true,
shade: 0.8,
area: ['50%', '90%'],
closeBtn: 1,
content: ONLINE.editprotocolurl+'?id='+protocol_id
,btn: ['确定']
,yes: function(index, layero){
var body = layer.getChildFrame('body', index);
var name=body.find('#name').val();
var status=body.find('#status').val();
var content=body.find('#content').val();
editprotocol(protocol_id,name,status,content);
}
});
//html文件
<script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-all-min.js"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh-CN.js"></script>
<textarea id="content" > {$info.content|default=''} </textarea>
<script>
//编辑器
KindEditor.ready(function(K) {
window.editor = K.create('#content', {
width : '700px',
height : '500px',
uploadJson : "{:url('admin/Upload/kindEditorUpload')}",
fileManagerJson : '__PUBLIC__/kindeditor/php/file_manager_json.php',
allowFileManager : false,
afterCreate : function() { this.sync(); }, //关键是这两个
afterBlur: function(){ this.sync();},//关键是这两个
});
});
</script>