function ReloadEditor() { var oCKeditor=CKEDITOR.replace('txtcontent'),{toolbar:'Full'}); //實例化editor oCKeditor.on('instanceReady',function(event)) //准備 { var editor=event.editor; setTimeout(function(){ //延時加載 if(!editor.element) { setTimeout(arguments.callee,1); return; } event.removeListener('instanceReady',this.callee); if(editor.name=='txtcontent') { editor.resize(editor.container.getStyle('width'),CKEDITOR.document.getById('cke_'+'txtcontent').getParent().$.offsetHeight); //重載高度計算高度 } },0); },null,null,9999); }
//設置ckeditor只讀
CKEDITOR.config.readOnly=true;