function openWindow(cate_id,model_id){
$('#w').window('refresh', '/admin.php?s=/Article/add/cate_id/'+cate_id+'/pid/0/model_id/'+model_id);
$('#w').window('open');
}
the editor is not loaded! see the Attache: 1.jpgthe html
<textarea name="content"></textarea>
<input type="hidden" name="parse" value="0">
<link rel="stylesheet" href="/Public/static/kindeditor/default/default.css" />
<script charset="utf-8" src="/Public/static/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="/Public/static/kindeditor/zh_CN.js"></script>
<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
allowFileManager : false,
themesPath: K.basePath,
width: '100%',
height: '500px',
resizeType: 1,
pasteType : 2,
urlType : 'absolute',
fileManagerJson : '/admin.php?s=/Article/fileManagerJson.html',
//uploadJson : '/admin.php?s=/Article/uploadJson.html' }
uploadJson : '/admin.php?s=/Addons/execute/_addons/EditorForAdmin/_controller/Upload/_action/ke_upimg.html'
});
});
$(function(){
//传统表单提交同步
$('textarea[name="content"]').closest('form').submit(function(){
editor.sync();
});
//ajax提交之前同步
$('button[type="submit"],#submit,.ajax-post').click(function(){
editor.sync();
});
})
</script>