2012-07-18 91 views

回答

2

您可以为每个实例设置配置。

下面的示例包括配置设置以关闭自动增长并通过设置高度和禁用调整大小来设置恒定高度。

如果要修改一堆配置设置为特定的实例,你可以调用自定义配置文件:

CKEDITOR.replace('textareaID', 
{ 
    customConfig : 'customConfigSettingsA.js'; 
}); 

否则只包括文件中的设置,当你创建实例。

CKEDITOR.replace('textareaID', 
{ 
    config.autoGrow_onStartup = false, 
    config.resize_enabled = false, 
    config.height = '111px'; 
}); 

您也可以加载共享自定义配置文件,并在同一时间设置特定的设置:

CKEDITOR.replace('textareaID', 
{ 
    customConfig : 'customConfigSettingsA.js', 
    config.autoGrow_onStartup = false, 
    config.resize_enabled = false, 
    config.height = '111px'; 
}); 

看到这个职位的控制宽度,高度额外的配置设置,可调整大小和最小/最大尺寸设置:

How to set and lock the CKEditor window size?

0

由于codewaggle和

oleq jQuery UI Resizable in CKEditor

这里是我是如何实现他们的建议:

<form ..... onload="CKStart()"> 
..... 
<div id="resizable" style="overflow: hidden; max-height:240px;"> 
    <ckeditor:editor name="content" id="myCKEditor" height="200px" width="100%" > 
    </ckeditor:editor> 
    </div> 


... 

</form> 

<script> 

function CKStart(){ 
    var editor = CKEDITOR.replace('myCKEditor', { 
    autoGrow_onStartup: false, 
     resize_enabled: false, 
    height: '200px' 

    }); 
} 
</script> 

它似乎是工作 - 没有可用的

调整大小
相关问题