Forum closed. New forum available at

Custom toolbar buttons

Support forum for WYMeditor.

Custom toolbar buttons

Postby pspace on Tue Jul 31, 2007 5:02 pm


Can anyone help or point me in the direction of some documentation that demonstrates how to create custom toolbar buttons for 0.4?

I would like to create buttons which insert preset text/html at the cursor position and also one's which display custom dialogs.

I worked a little on WYMEditor 0.2 a while ago and these requirements seemed quite easy to do. But I have no idea in 0.4.

Thanks for any help!
Posts: 2
Joined: Tue Jul 31, 2007 4:27 pm

Postby jfh on Thu Aug 02, 2007 9:42 am

Please take a look at the Tidy plugin, provided in the package.
You can start with something like:
Code: Select all

    postInit: function(wym) {

        var html = "<li class='wym_tools_newbutton'>"
                 + "<a name='NewButton' href='#'"
                 + " style='background-image:"
                 + " url(newbutton.png)'>"
                 + "Do something"
                 + "</a></li>";

        .find(wym._options.toolsSelector + wym._options.toolsListSelector)

        //handle click event
        .find('li.wym_tools_newbutton a').click(function() {
            //do something
User avatar
Site Admin
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby pspace on Thu Aug 02, 2007 9:46 am


Merci beaucoup
Posts: 2
Joined: Tue Jul 31, 2007 4:27 pm

Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests