I have a custom menu bar plugin for TinyMCE-3.5.10
. One of the buttons, marked play is created thus:
case 'play':
playBtn = cm.createButton('play', {
title : 'Play',
image : 'tinymce/jscripts/tiny_mce/plugins/mainMenuBar/img/play.png',
onclick : function() {
readText();
}
});
return playBtn;
My question:
1. How can I change the image icon for this button programmatically? The command playBtn.renderHTML()
does provide me the HTML
code with the src
parameter showing the location of the image. If I parse the HTML string and change the src
parameter to point to a new image, how do I associate this string with the button again?