Changing skin for ckeditor

有些话、适合烂在心里 提交于 2021-02-11 18:10:26

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/59085884/changing-skin-for-ckeditor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!