Search code examples
buttonckeditoricons

CKEditor 4 does not display button image


I did the plugin according to the instructions. https://docs.ckeditor.com/ckeditor4/latest/guide/plugin_sdk_sample.html I installed a plug-in that they developed the Timestamp, but the picture even does not display their plug-in. http://prntscr.com/j9wzxq http://prntscr.com/j9x078

(CKEditor 4.8.0 (revision 230f715))


Solution

  • Icon name has to match button name in lowercase. Please read the guide carefully one more time.

    CKEDITOR.plugins.add( 'pluginname', {
        icons: 'buttonname',
    ...
    
    editor.ui.addButton( 'Buttonname',...
    

    In your case this will be:

    CKEDITOR.plugins.add( 'imgcollection', {
        icons: 'piccollection',
    ...
    
    editor.ui.addButton( 'Piccollection',...