2012-07-18 138 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> 

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

調整大小
相關問題