2010-12-10 82 views

回答

25

添加的高度和寬度設置的參數:

CKEDITOR.replace('content', 
    { 
     toolbar : 
     [ 
      ['Source'], 
      ['Bold','Italic','Underline','Strike'], 
     ], 
     height: 300, 
     width: 400 
    }); 
+1

其中「內容」是textarea標籤的ID或名稱。 – dirtyhandsphp 2013-04-05 10:55:19

0

轉到confi.js文件,並在

CKEDITOR.editorConfig = function(config) { 
. 
. 
. 
. 
**config.height = 320;** 
}; 

所以實際上你只需要添加config.height = required height;

0

這可以通過在通用腳本文件添加幾行代碼輕鬆完成。

  1. 創建一個成員變量以獲得段落標籤的總大小 var ttl = 0;
  2. 檢查每個段落元素以獲取其外部高度並將該值附加到總計 $()。find('p')。each(function(){ttl + = $(this).outerHeight(true) ; });
  3. 添加忽略的編輯器頁眉和頁腳大小。它是120px! var total = total + 120;
  4. 以一個參考到您的變種ETR = CKEDITOR.instance [ ''];
  5. 根據總量調整窗口大小。 etr.resize(,);

**注:沒有必要提及「PX」既不是寬度還是高度。 '%'是必須的!

就是這樣!