Here's my custom button js:
- Code: Select all
// Horizontal Rule
var html = "<li class='wym_tools_hr'>"
+ "<a name='HorizontalRule' href='##'"
+ " style='background-image:"
+ " url(#request.LayoutRoot#images/icon_wymeditor.png)'>"
+ "Horizontal Rule"
+ "<\/a><\/li>";
//add the button to the tools box
jQuery(wym._box)
.find(wym._options.toolsSelector + wym._options.toolsListSelector)
.append(html);
//handle click event
jQuery(wym._box)
.find('li.wym_tools_hr a').click(function() {
//do something
wym.paste('<hr />');
return(false);
});
Do I need to include anything else in my script or my styles to get this to function correctly? Thanks!