CKEDITOR.styleSet.add - new style for 'a' element

后端 未结 1 1903
无人共我
无人共我 2021-01-15 14:55

For some reason if I change \'p\' to \'a\', it no longer appears on the style list. Any reason why?

CKEDITOR.stylesSet.add(\'defaul         


        
相关标签:
1条回答
  • 2021-01-15 15:38

    Your problem is a bracket mess. This code will work:

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

    EDIT: 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

    0 讨论(0)
提交回复
热议问题