CKEDITOR只读状态下实现方式

时间:2025-02-07 18:05:31

<script language="javascript">
$(document).ready(function(){
( 'SysBBSBody');
if(<计算的值>){//只读模式
 ('instanceReady',function(event){
 editor=;
 ("toolbarCollapse");
 (true); //只读
 setTimeout( function(){
  // Delay bit more if editor is still not ready.
  if ( ! ){
   setTimeout( , 100 );
   return;
  }
  ( 'instanceReady', );

‘自动调整内容高度
  var iframe=$("#cke_1_contents").find("iframe").eq(0);
  var height=iframe[0].+50;
  $("#SysBBSBody").parent().css("height",height);
  $("#cke_1_contents").css("height",height)
  (0).css("height",height);
  $("#cke_1_top").css("display","none")//隐藏按钮区 
  $("#cke_1_bottom").css("display","none");//隐藏脚本区
 },0
 );
 });
}
})
</script>