I have created a custom button, to appear in the bottom toolbar, beside the readmore button in Joomla. I found the readmore plugin in the folder plugins\editors\ckeditor\plugins\readmore. I would like to create a simple button that inserts a list with the class of "list-icon circle-arrow". But the button is not registering.
Here is my code:
I'm really quite new to this, so thanks for understanding. Any help would be appreciated.
Here is my code:
/** * @file Plugin for inserting Joomla a custom list element */ CKEDITOR.plugins.add( 'list', { requires : [ 'fakeobjects', 'htmldataprocessor' ], init : function( editor ) { // Register the toolbar buttons. editor.ui.addButton( 'list', { label : 'Insert A List', icon : this.path + 'images/readmoreButton.gif', command : 'list' }); editor.addCommand( 'list', { exec : function() { insertComment( 'list' ); } } ); function insertComment( text ) { editor.insertHtml('<ul class="list-icon circle-arrow' + text +'" />'); } } });
I'm really quite new to this, so thanks for understanding. Any help would be appreciated.
Re: Custom Button Code: Plugin Not Registering
please see config.ini file (in plugins/editors/ckeditor directory). You should register your's button there and it should be visible in "Layout setting" after registering.
Re: Custom Button Code: Plugin Not Registering
Thanks. This should be in your documentation.
Re: Custom Button Code: Plugin Not Registering
I double-checked that the corresponding toolbar was the one I edited and was the enabled one.
Help please?
Re: Custom Button Code: Plugin Not Registering
please upload your plugin.
I will try check this. Please write me also which version of Joomla and CKEditor for Joomla do you use ?
Re: Custom Button Code: Plugin Not Registering
plugin.zip
Attachments:
Re: Custom Button Code: Plugin Not Registering
I made small changes to your plugin. After adding button you should see it in CKEditor.
I will add small fix to next release of our component to Joomla.
You also have right that this feature should be documented. We will fix this in future.
Thank you for noticing this.
Attachments: