Forum closed. New forum available at http://community.wymeditor.org/

Tooltip on custom buttons ?

Support forum for WYMeditor.

Tooltip on custom buttons ?

Postby pl! on Thu Jan 31, 2008 2:46 pm

Hi,

I use WYMeditor in a web application. Works great so far.
I had to create a custom button that triggers a new function, a walk in the park with this little howto: http://forum.wymeditor.org/forum/viewtopic.php?t=151

But how can I add a tooltip to my button ? The tooltip should be translated like the tooltips on the default buttons.
pl!
 
Posts: 8
Joined: Thu Jan 31, 2008 2:37 pm

Postby issac.kelly on Sat Feb 02, 2008 3:42 pm

add a title to your <a tag>
issac.kelly
 
Posts: 9
Joined: Sat Feb 02, 2008 2:42 pm

Postby pl! on Thu Feb 07, 2008 10:08 am

Ok, this is my code in "postInit" :
Code: Select all
var html = "<li class='wym_tools_clearbutton'>"
                 + "<a name='ClearButton' href='#'"
                 + " style='background-image:"
                 + " url(scripts/wymedit/wymeditor/skins/default/clearbutton2.png)'>"
                 + "ClearContent"
                 + "</a></li>";


By "title", do you mean an attribute "title" of the <a/> tag or is "ClearContent" the title ?
pl!
 
Posts: 8
Joined: Thu Jan 31, 2008 2:37 pm

Postby issac.kelly on Sat Feb 09, 2008 4:08 am

attr, use this

Code: Select all
var html = "<li class='wym_tools_clearbutton'>"
                 + "<a name='ClearButton' href='#'"
                 + " style='background-image:"
                 + " title="ClearContent"
                 + " url(scripts/wymedit/wymeditor/skins/default/clearbutton2.png)'>"
                 + "ClearContent"
                 + "</a></li>";
issac.kelly
 
Posts: 9
Joined: Sat Feb 02, 2008 2:42 pm

Postby pl! on Thu Feb 14, 2008 8:10 am

Works, thank you. But I'd also like to make that buttons tooltip to be translated.
I already added the tooltip-attribute's value in different language-javascripts, but that doesn't solve it.
pl!
 
Posts: 8
Joined: Thu Jan 31, 2008 2:37 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests