Hi,
I have create one custom toolbar in config.js.
I have used this toolbar lot of places, but now i required new toolbar which same as above only need to add one more custom button,
its possible but for that i need to create new toolbar with diff. name in config.js.
Is any way to add new button using API without changing in old toolbar definition or way to extend existing toolbar using API.
Thanks
I have create one custom toolbar in config.js.
config.toolbar_message_center = [ { name: 'document', items : [ 'Source' ] } , { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike'] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'links', items : [ 'Link','Unlink'] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList' }, { name: 'tools', items : [ 'Maximize' ] } ];
I have used this toolbar lot of places, but now i required new toolbar which same as above only need to add one more custom button,
its possible but for that i need to create new toolbar with diff. name in config.js.
config.toolbar_message_center_2 = [ { name: 'document', items : [ 'Source' ] } , { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike'] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'links', items : [ 'Link','Unlink'] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList' }, { name: 'tools', items : [ 'Maximize' ] }, { name: 'custom', items : [ 'MyButton' ] } ];
Is any way to add new button using API without changing in old toolbar definition or way to extend existing toolbar using API.
Thanks
Re: How to add custom button on toolbar using API only ?
Why exactly you don't want to define both toolbars in config.js? Is it because of code duplication or you have other requirements?
Re: How to add custom button on toolbar using API only ?