2011-08-28 96 views
2

我在嘗試ckeditor,但我無法將工具欄位置設置爲底部(默認情況下它設置爲頂部)。 我閱讀文檔,我寫了這個snipet在config.js文件:無法在底部設置ckeditor工具欄位置

CKEDITOR.editorConfig = function(config) 
{ 
    config.toolbarLocation = 'bottom'; 
} 

在config.js我定義工具欄和config.toolbarLocation = 'bottom'然後我打電話的CKEditor在這種模式下:

CKEDITOR.replace('editor', { toolbar : 'Full' }); 

我還有其他東西嗎?它不起作用。我只看到沒有工具欄的textarea(頂部的工具欄消失)。 你能幫我嗎?

+1

,設置正常工作對我來說,也許你正在做別的事情了? – AlfonsoML

+0

在config.js中我定義了一個工具欄和config.toolbarLocation ='bottom';然後我把這個模式的CKEditor:CKEDITOR.replace( '編輯',{ \t \t \t工具欄: '全' \t \t \t \t \t});我還有其他東西嗎? – paganotti

+0

您可能在工具欄定義 – AlfonsoML

回答

2

我想這是優先被覆蓋。試試這個:

CKEDITOR.replace('editor', { toolbar : 'Full', toolbarLocation : 'bottom' }); 
0

試試這個代碼:

CKEDITOR.replace('editor1', { 
        /* 
        * Ensure that htmlwriter plugin, which is required for this sample, is loaded. 
        */ 
        //    extraPlugins: 'htmlwriter', 
        toolbarLocation: 'bottom', 
        height: 200, 
        width: '100%', 
        toolbar: [ 
         ['Bold', 'Italic', 'Underline', '-', 'BulletedList', '-', 'Link', 'Unlink'], 
         ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], 
         ['TextColor'] 
        ]});