2015-07-01 50 views
-1

我的CKEditor在模式內聯,和一個的我遇到的問題之一是子彈和數字(列表)未連接到的顏色和/或字體大小。CKEditor的符號和編號格式化

鎖定這個圖像中的例子:

http://i.imgur.com/M65q2mG.png

在我config.js定義字體大小我有這個配置:

config.fontSize_defaultLabel = 'Size'; 
config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px;96/96px;120/120px;144/144px;168/168px;192/192px;216/216px;240/240px;264/264px;288/288px;312/312px'; 
config.fontSize_style = { 
    element: 'span', 
    attributes: {'class':'font-#(size)'}, 
    overrides: [ { 
     element: 'span', attributes: { 'class': null } 
    } ] 
}; 
  • 是否有辦法來解決這個 ?
+1

如果你有三個獨立的問題,你通常應該問他們分開這樣你會得到如果某人只知道一件事,並且爲了在將來可能會遇到類似問題而更容易搜索他人,則可以爲每個問題提供更相關的答案。 –

+1

謝謝!我會這樣做的! –

+0

請使用jsfiddle.net並提供一些代碼示例,以便我們可以查看您正在處理的內容。 – Dekel

回答

0

在你的CKEditor的文件夾中有一個config.js文件。在那裏,你可以設置你的工具欄有你的部分,按鈕...

樣本工具欄的配置:

config.toolbarGroups = [ 
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, 
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] }, 
    { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, 
    { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] }, 
    { name: 'tools', items: [ 'Maximize' ] }, 
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source' ] }, 
    { name: 'others', items: [ '-' ] }, 
    '/', 
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Strike', '-', 'RemoveFormat' ] }, 
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] }, 
    { name: 'styles', items: [ 'Styles', 'Format' ] }, 
    { name: 'about', items: [ 'About' ] } 
]; 

如果你不想或者不能編輯配置文件,您可以創建當你在這個例子中實例化編輯器,比如:http://jsfiddle.net/ddan/B4yGJ/489/(的jsfiddle)

代碼:

CKEDITOR.replace('editor1', { 
    toolbar : [ 
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, 
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] }, 
    { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, 
    { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] }, 
    { name: 'tools', items: [ 'Maximize' ] }, 
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source' ] }, 
    { name: 'others', items: [ '-' ] }, 
    '/', 
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Strike', '-', 'RemoveFormat' ] }, 
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] }, 
    { name: 'styles', items: [ 'Styles', 'Format' ] }, 
    { name: 'about', items: [ 'About' ] } 
] 
}); 
+0

問題不在於子彈按鈕或數字是可見的,因爲它們是。但他遵循文中定義的顏色/大小 –