piernik
piernik

Reputation: 3657

Changing skin for ckeditor

Am I able to change skin? I'm creating angular app, that has light and dark theme. I have prepared two ckeditor skins. But even if I destroy ck instance, next instance has previuos skin - not current.

Upvotes: 0

Views: 1622

Answers (1)

Jacek Bogdański
Jacek Bogdański

Reputation: 198

CKEditor4 skins are applied to instance creation, so recreating instance is a good way to dynamically update editor skin. You should be able to pass configuration option config.skin when replacing DOM element with an editor to indicate its skin e.g:

CKEDITOR.replace( 'editor', {
  skin: 'moono'
} );

Note that custom skin should be placed in skins folder or you should pass additional information about location, e.g.

config.skin = 'myskin,/customstuff/myskin/';

If you still struggle with setting custom skin, please share your current implementation.

Upvotes: 1

Related Questions