i test the example of InsertSpecialLink it is work fine exept when i select a normal text and a link i have this error js :
Message : Erreur d'exécution inconnue
Ligne : 147
Caractère : 14
Code : 0
URI : http://soliserv02/chart_test_export/editor2.aspx
how i fix that?
my code where ia have the error :
| <script type="text/javascript"> |
| //<![CDATA[ |
| Telerik.Web.UI.Editor.CommandList["InsertSpecialLink"] = function(commandName, editor, args) { |
| var elem = editor.getSelectedElement(); //returns the selected element. |
| if (elem.tagName == "A") { |
| editor.selectElement(elem); |
| argument = elem; |
| } |
| else { |
| var content = editor.getSelectionHtml(); |
| var link = editor.get_document().createElement("A"); |
| // the error of selection |
| link.innerHTML = content; |
| argument = link; |
| } |
| var myCallbackFunction = function(sender, args) { |
| editor.pasteHtml(String.format("<a href={0} target='{1}' class='{2}'>{3}</a> ", args.href, args.target, args.className, args.name)) |
| } |
| editor.showExternalDialog( |
| 'InsertLink.aspx', |
| argument, |
| 270, |
| 300, |
| myCallbackFunction, |
| null, |
| 'Insert Link', |
| true, |
| Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, |
| false, |
| true); |
| }; |
| //]]> |
| </script> |