CKEDITOR.styleSet.add - 'a'元素的新样式

时间:2012-09-17 16:59:47

标签: javascript ckeditor

出于某种原因,如果我将'p'更改为'a',则它不再出现在样式列表中。有什么理由吗?

CKEDITOR.stylesSet.add('default',[ 
        { name : 'Wys wiersza 1' , 
          element : 'p', 
          styles : { 'line-height' : '18px' } 
         }
]);

编辑了代码,我在复制时遗漏了一些括号

1 个答案:

答案 0 :(得分:3)

你的问题很麻烦。这段代码可以使用:

CKEDITOR.stylesSet.add( 'default',
    [
        {
            name: 'Wys wiersza 1' ,
            element: 'p',
            styles: { 'line-height' : '18px' }
        }
    ]
);
编辑:现在我看到它是一个CKEditor错误,因为它只对element: 'a'失败了。为此创建的票证:https://dev.ckeditor.com/ticket/9349

相关问题