This is a migrated thread and some comments may be shown as answers.

Default URL of Hyperlink Manager

1 Answer 107 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Susan
Top achievements
Rank 1
Susan asked on 18 Aug 2009, 06:25 PM
Is there any way to default the value of the URL in the Hyperlink Manager? I have a standard URL and then the flle name appended to the end (which I know), so I would know the entire path without my user's having to enter it. Is there a way to do this?

Also, would there be a way to default to 'Target' to 'New Window'?

Thanks,
Susan

1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 19 Aug 2009, 02:41 PM
Susan,
Follow the first 2 and 1/2 steps here (you want to stop at opening the LinkManager.ascx file) and then do a search for "http://" (the var 'href' is what you are looking for, I found it on line 109) and then just change the string to whatever you want.
http://www.telerik.com/help/aspnet-ajax/disablingtabs.html
For the default behavior of a link to be New Window you can do the following:

<script type="text/javascript"
   function OnClientLoad(editor) 
   { 
       var links = editor.get_document().getElementsByTagName("A"); 
       for (var i = 0; i < links.length; i++) 
       { 
           var link = links[i]; 
           link.setAttribute("target", "#"); 
       }; 
    } 
</script> 
And then in the RadEditor tags set the attribute OnClientLoad="OnClientLoad", that should take care of it!
Tags
Editor
Asked by
Susan
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or