I want a button in tinymce toolbar. On click of that button "HELLO" should come in the editor wherevere the cursor is.
Version:3.3.7
But I am not able to add that button.
I have tried adding button like this
setup: function (ed) {
ed.addButton('example', {
title : 'example.desc',
image : '../jscripts/tiny_mce/plugins/example/img/example.gif',
onclick : function() {
ed.windowManager.alert('Hello world!! Selection: ' + ed.selection.getContent({format : 'text'}));
}
});
}
Don't forget to add your button to the toolbar
option when initializing.
http://fiddle.tinymce.com/ngdaab/0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With