On a custom toolbar button click I would like to insert a start html tag at begining of selected content and and an close tag at the end of the selection.
There is a help on inserting HTML tag at the beginning of the selection, the problem is inserted the close tag at the end of the selection
for example a user selcts some text in content area;
Telerik.Web.UI.Editor.CommandList["MyTestButton"] = function(commandName, editor, args)
{
editor.pasteHtml('<TagBegin>');
/*some way to find end of selection ???*/
editor.pastHtml('<TagEnd>');
};
Thanks in advanced
-----addendum-----
---Never mind... This is clearly addressed in the help---
http://www.telerik.com/help/aspnet-ajax/obtainingcurrenteditorselectionashtml.html
There is a help on inserting HTML tag at the beginning of the selection, the problem is inserted the close tag at the end of the selection
for example a user selcts some text in content area;
Telerik.Web.UI.Editor.CommandList["MyTestButton"] = function(commandName, editor, args)
{
editor.pasteHtml('<TagBegin>');
/*some way to find end of selection ???*/
editor.pastHtml('<TagEnd>');
};
Thanks in advanced
-----addendum-----
---Never mind... This is clearly addressed in the help---
http://www.telerik.com/help/aspnet-ajax/obtainingcurrenteditorselectionashtml.html