Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/477.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript CKEditor项目符号和数字格式_Javascript_Php_Jquery_Ckeditor - Fatal编程技术网

Javascript CKEditor项目符号和数字格式

Javascript CKEditor项目符号和数字格式,javascript,php,jquery,ckeditor,Javascript,Php,Jquery,Ckeditor,我的CKEditor处于内联模式,其中一个问题是项目符号和数字(列表)没有附加到颜色和/或字体大小 锁定此图像中的示例: 在my 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;2

我的CKEditor处于内联模式,其中一个问题是项目符号和数字(列表)没有附加到颜色和/或字体大小

锁定此图像中的示例:

在my 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 }
    } ]
};
  • 有没有办法绕过这个问题

在您的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' ] }
];
如果不想或无法编辑配置文件,可以在实例化编辑器时创建,如本例所示:(JSFiddle)

代码:


如果你有三个独立的问题,你通常应该分别问他们,这样,如果有人只知道一个问题,你会得到每个问题的更相关的答案,同时也可以更容易地搜索将来可能有类似问题的其他人。谢谢!我就这么做!请使用jsfiddle.net并提供一些代码示例,以便我们可以查看您正在处理的问题。谢谢你的评论!问题不在于项目符号、按钮或数字是可见的,因为它们是可见的。但他遵循文本中定义的颜色/大小
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' ] }
]
});