Reputation: 2879
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
Upvotes: 2
Views: 1021
Reputation: 15895
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
Upvotes: 3