Vanilla open source was terminated 1 January 2025 by Higher Logic. See this announcement for more information.
Programming custom buttons for TinyMCE in Wordpress?

Yup {very} off topic I know, but maybe somone can help...
I need to add a custom button to the WYSIWYG editor in Wordpress, and have found a plugin to help with this. But I need some javascript to take the selected text, and apply a style to it, like this:
becomes
any ideas?
I need to add a custom button to the WYSIWYG editor in Wordpress, and have found a plugin to help with this. But I need some javascript to take the selected text, and apply a style to it, like this:
selected text
becomes
<span class="mp3">selected text</span>
any ideas?
0
This discussion has been closed.
Comments
the syntax for adding the code is more like this example:
buttonsnap_jsbutton($button_image_url2, 'Javascript Button', 'alert(\'foo!\');');
so i've inserted your function below this in the php file, and am just trying to call it now...