I want to integrate some bootstrap classes to my ckeditor profile:
{ name : 'Button Large' , element : 'a', attributes : { 'class' : 'btn-lg' } },
{ name : 'Button Primary' , element : 'a', attributes : { 'class' : 'btn-primary' } },
but the problem is those styles cant be combined. If I want a button which is btn-primary
AND btn-lg
I would have to create a third style:
{ name : 'Button Large Primary' , element : 'a', attributes : { 'class' : 'btn-lg btn-primary' } },
which obviously is quite redundant for many buttons and not necessary. So how can you do this?
Using CKeditor 4.4.3
CKEditor does not currently support setting two styles on the same element from their dropdown. Have a look at this or this ticket in their tracker.
If adding the classes in the source view is not an option you may have to write your own plugin (like this SO user is doing for colors.