Can someone tell me how to set default "target" property to "New Window" in Document Manager Dialog of RadEditor ? ( Currently default target is “None” ). I don't want to do this way http://www.telerik.com/community/forums/aspnet/editor/document-link-deafult-target-blank.aspx .
7 Answers, 1 is accepted
Please, see the following article on the subject:
Once you configure the editor to use its external dialog files, you should open the \EditorDialogs\DocumentManager.ascx file and set the selectedIndex of the _documentTargetCombo object to 2, e.g.
this._documentTargetCombo.selectedIndex = 2;
The original index is 0.
Here is the modified function:
Save the file and refresh the page.
the Telerik team
I need to achieve the same solution, but seems like I can't achieve as I am using the latest version. Can someone please guide me?
The DocumentManager.ascx user control is different in the latest version, but you could still use the same approach suggested by Rumen. What you should do is to change directly the link, rather than the index of the selection drop-down.
Here you are an example of the same method modified for the latest version of RadControls (2013.2.717):
This is still not working :( Did you test the solution?
I am attaching a short clip presenting the default value of the target attribute in the document manager after the modification in the dialog.
Also there is attached the sample project I have been working with, so that you could follow it and use it for your project.
If you still have difficulties about the custom dialog please get back to me with information about some of the following issues:
- Confirm that you are using the latest version of RadControls (2013.2.717);
- Confirm that you are copying the desired Dialog file from the installation folder of RadControls;
- Could you try following the approach from this online demo and let me know if you encounter the same problem;
This additional information will help me investigate the described issue.
I am facing an issue in radeditor hyperlink manager. by default 'target' value is getting saved as 'new window', when i am choosing any other options and after clicking ok it is modified as 'new window'. when I reopen the hyperlink manager I am only getting 'new window' but not the previous option what i have chosen.
can any one help me in finding the solution. currently we are using telerik version 2012.2.912.35.
I tried to reproduce the problem, but to no avail. Please try using this online demo and get back to me with the exact steps, so that I could investigate them. It would be helpful if you could create a screencast of the process so that I could be sure what is the described unexpected behavior.
Note that only the last target attribute's value should be correctly saved into the HTML content. You could check if it is correct by switching to HTML view.