CkEditor - 同时有两种款式......?

时间:2015-09-15 21:48:50

标签: javascript ckeditor ckeditor4.x

有没有办法用ckeditor样式列表添加多个类?

我的ckeditor.style.js中有两节课

{ name: 'Important (petit)', element: 'p', attributes: { 'class': 'important-small' } },
{ name: 'Capitalize', element: 'p', attributes: { 'class': 'caps' } },

我想,如果你通过样式列表选择这两个类:

<p class="important-small caps">my test</p>

但如果我选择了一个类,而另一个类刚刚选择,第一个类消失,替换为第二个

1 个答案:

答案 0 :(得分:1)

你是not the first to encounter this problem.

但是,CKEditor目前不支持从下拉列表中为同一元素设置两个样式。查看其跟踪器中的thisthis票证。

如果在源视图中添加类不是一个选项,则可能需要编写自己的插件(如this SO user is doing for colors

相关问题