2015-07-01 171 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

问题不在于子弹按钮或数字是可见的,因为它们是。但他遵循文中定义的颜色/大小 –