I have 2 questions:
1- Can multiple custom buttons be added to the toolbar?
2- Can a button be programmed to parse and modify the html through Javascript?
1 Answer, 1 is accepted
0
Rumen
Telerik team
answered on 30 Apr 2008, 12:07 PM
Hello Abdu,
Straight to the questions:
Yes, it is possible. You can see how to add a custom button in the following help article: Adding Your Own Buttons.
Each custom button has a javascript command which allows you to execute javascript code, e.g.
<script type="text/javascript"> Telerik.Web.UI.Editor.CommandList["Custom1"]=function(commandName, editor, args)
{ alert("Custom command 1"); //here you can obtain the editor content with editor.get_html(true);
//parse it with your own code and paste it or set it back in the content area with editor.pasteHtml("modified content"); //editor.set_html("modifiedcontent");
};