CKEDITOR.styleSet.add - “a”元素的新样式 [英] CKEDITOR.styleSet.add - new style for 'a' element
本文介绍了CKEDITOR.styleSet.add - “a”元素的新样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于某种原因,如果我将'p'
更改为'a'
,它不再出现在样式列表。任何原因?
For some reason if I change 'p'
to 'a'
, it no longer appears on the style list. Any reason why?
CKEDITOR.stylesSet.add('default',[
{ name : 'Wys wiersza 1' ,
element : 'p',
styles : { 'line-height' : '18px' }
}
]);
编辑代码,我在复制时错过了一些括号
-edited the code, I missed some brackets while copying
推荐答案
您的问题是一个括号乱。此代码将工作:
Your problem is a bracket mess. This code will work:
CKEDITOR.stylesSet.add( 'default',
[
{
name: 'Wys wiersza 1' ,
element: 'p',
styles: { 'line-height' : '18px' }
}
]
);
编辑:现在我看到它是一个CKEditor错误,因为它只会失败元素:'a'
。为此创建的票证: https://dev.ckeditor.com/ticket/9349
Now I see it's a CKEditor bug as it only fails for element: 'a'
. Created ticket for this: https://dev.ckeditor.com/ticket/9349
这篇关于CKEDITOR.styleSet.add - “a”元素的新样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文