2015-11-10 56 views
0

您好我現在用的是CKEditor的4.3.2版有4個自定義插件,它們出現的嵌件工具欄和我打電話這樣的插件:CKEDITOR自定義插件命令

extraPlugins: 'aexpagebreak,aexextraline,aexsinglecolumn,aextwocolumn', 

它們被加載罰款,但每次頁面重新加載時,欄中插件的順序都隨機更改,我怎樣才能爲工具欄中的插件圖標定義一個固定的順序?

回答

1

您可以通過定義一個告訴ckeditor如何顯示和分組項目的對象來自己配置工具欄。

http://docs.ckeditor.com/#!/guide/dev_toolbar

從CKEditor的文檔:

config.toolbarGroups = [ 
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, 
    { name: 'editing',  groups: [ 'find', 'selection', 'spellchecker' ] }, 
    { name: 'links' }, 
    { name: 'insert' }, 
    { name: 'forms' }, 
    { name: 'tools' }, 
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, 
    { name: 'others' }, 
    '/', 
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, 
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] }, 
    { name: 'styles' }, 
    { name: 'colors' }, 
    { name: 'about' } 
]; 

更多信息:

http://docs.ckeditor.com/#!/guide/dev_toolbarconcepts-section-toolbar-groups-configuration

貌似沒有在其網站上的工具欄配置工具,但它可能只對V4 .5及以上。不能完全肯定:

http://ckeditor.com/tmp/4.5.0-beta/ckeditor/samples/toolbarconfigurator/index.html#basic

+1

謝謝,我覺得應該是沒有寫全的工具欄結構的方式,但也...順便說一下,[有](http://stackoverflow.com/問題/ 18442383 /其中的所有工具欄按鈕名稱和組名稱可用在ckeditor)是一個完整的工具欄配置 – Cesar

+0

@Cesar是它很煩人。爲什麼我能夠回答,自己必須自己做。 – AtheistP3ace