<a href="#Download">Download Source</a>
will sometimes get changed to this:
<a target="_blank" re_target="null" href="#Download">Download Source</a>
I have no idea what is causing this to happen, but we work with the rad editor extensively and have found that about one out of every hundred documents containing links will randomly generate the above target and re_target properties. This causes all of the links to open in new windows.
I want to know if anyone has insight on this issue or even knows what causes it. This error is seemingly random and I have NOT been able to replicate it with hundreds of attempts. We create a large amount of different documents with the SAME links and some of them get these values generated for them.
One thing I did notice is that when switching from HTML view with the generated properties to PREVIEW and then back to HTML would most of the time clear the properties as if they were never there.
Any help is appreciated, thanks.
16 Answers, 1 is accepted

Anyone?
We are not aware of this problem and you are the first one to report it. I tried to reproduce it locally but to no avail. To able to provide assistance on this issue we will need to be able to observe and debug it locally. Could you please provide more detailed information on the specific scenario?
- Which version of RadControls for ASP.NET AJAX and .NET Framework are used in the application?
- Under which browser and its version the problem occurs?
- Could you please provide the exact RadEditor's configuration with all the customizations applied to it so we can examine it further?
On a side note, re_target attribute is used to store the original target attribute's value when switching to preview mode.
All the best,
Dobromir
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Our rad editor looks like this:
<telerik:RadEditor ID="ContentEditor" runat="server" EnableResize="True" Height="500px" Width="100%" AllowScripts="False" ToolsFile="/_Config/ContentProductionEditorTools.xml" TemplateManager-ViewPaths="/Templates" TemplateManager-UploadPaths="/Templates"> <CssFiles> <telerik:EditorCssFile Value="/_Styles/CodeBox.css" /> </CssFiles> <Content> </Content> <ImageManager MaxUploadFileSize="20971520" /> <DocumentManager MaxUploadFileSize="20971520" /> <FlashManager MaxUploadFileSize="20971520" /> <TemplateManager UploadPaths="/Templates" ViewPaths="/Templates" /> </telerik:RadEditor>
The tools file config looks like this:
<root> <tools name="MainToolbar" dockable="true" enabled="true" DockingZone="Left"> <tool name="ImageManager" /> <tool name="DocumentManager" /> <tool name="TemplateManager" /> <tool name="FormatCodeBlock" /> </tools> <tools> <tool name="LinkManager" ShortCut="CTRL+K" /> <tool name="Unlink" ShortCut="CTRL+SHIFT+K" /> <tool separator="true"/> <tool name="AjaxSpellCheck" /> <tool name="FormatStripper" /> <tool name="XhtmlValidator" /> <tool name="FindAndReplace" ShortCut="CTRL+F" /> <tool name="SelectAll" ShortCut="CTRL+A" /> <tool name="Cut" /> <tool name="Copy" ShortCut="CTRL+C" /> <tool name="Paste" ShortCut="CTRL+V" /> <tool name="PasteStrip" /> <tool separator="true"/> <tool name="Undo" ShortCut="CTRL+Z" /> <tool name="Redo" ShortCut="CTRL+Y" /> </tools> <tools> <tool name="InsertTableLight" ShortCut="CTRL+ALT+T" /> <tool name="InsertFormElement" /> <tool name="InsertSymbol" /> <tool name="InsertSnippet" /> </tools> <tools name="FormatToolbar" dockable="true" enabled="true"> <tool name="ApplyClass" /> <tool name="Bold" ShortCut="CTRL+B" /> <tool name="Italic" ShortCut="CTRL+I" /> <tool name="Underline" ShortCut="CTRL+U" /> <tool name="StrikeThrough" /> <tool separator="true"/> <tool name="FormatBlock" /> <tool separator="true"/> <tool name="JustifyLeft" /> <tool name="JustifyCenter" /> <tool name="JustifyRight" /> <tool name="JustifyFull" /> <tool name="JustifyNone" /> <tool separator="true"/> <tool name="Indent" /> <tool name="Outdent" /> <tool separator="true"/> <tool name="InsertOrderedList" /> <tool name="InsertUnorderedList" /> <tool separator="true"/> <tool name="ModuleManager" /> <tool name="ToggleScreenMode" /> <tool name="Zoom" /> </tools> <modules> <module name="RadEditorStatistics" Visible="false" Enabled="true" /> <module name="RadEditorDomInspector" Visible="false" Enabled="true" /> <module name="RadEditorNodeInspector" Visible="false" Enabled="true" /> <module name="RadEditorHtmlInspector" Visible="false" Enabled="true" /> </modules> <snippets> <!--<snippet name="Tutorial Outline"> <![CDATA[ ]]> </snippet>--> </snippets> </root>
We have some snippets in our rad editor config but I have removed them in the above code snippet due to security reasons. As I have said, the error seems very hard to replicate but it definitely occurs. I will be working to replicate this as well and post any of my findings here.
Thanks for the feedback so far,
-Jamie


Just another thought, I hope that I can reproduce this error soon. Until then any input is appreciated.
Thanks,
Jamie
The provided RadEditor's configuration looks OK. To be able to provide more-to-the-point answer we will need reliable steps to reproduce the problem.
In addition, do you apply any modifications to the content (server- or client-side) before saving it?
Regards,
Dobromir
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

string strContentBody = ContentEditor.Content;
to get the content, then insert strContentBody into our database. Is there any more insight you can give me as to how the re_target property is actually generated?Edit: Forgot to mention that I have still not been able to replicate this, but I strongly believe it has something to do with storing the content of the editor in the database while in preview mode.

thought you may be interested - I also saw some 're-target' properties while researching a different problem - started a new thread - http://www.telerik.com/community/forums/aspnet-ajax/editor/anchors-and-preview-mode.aspx

However, we did notice that content with this code could sometimes be cleaned up simply by going to html -> preview -> html and then being saved again. It seems that this is not always the case as sometimes I have to manually clear out all of the target properties though.

Are you able to reproduce the problem on the live demos? If so, could you please provide the exact steps that need to be executed, if not could you try to upgrade to the latest version of RadControls for ASP.NET AJAX (currently Q1 2011 SP1) and see if the problem still occurs?
Regarding the re_target attribute, this attribute is applied to the links when RadEditor is set to preview mode. When RadEditor's mode is changed to preview, the control applies to all the link in the content target attribute with value _blank to ensure that clicking on the link will open it in a new window. The original value of the target attribute is stored in the re_target attribute.
All the best,
Dobromir
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

I was trying to get this re_target to generate and have been going to HTML, adding the following link:
<a href="#Download">Download Source</a>
Then, switching to preview mode. I have a button when clicked that grabs the content from the radeditor and stores it in a string. However, the string is always the same as my links. I was just wondering how exactly you were able to replicate it because I cannot seem to find a point where the re_targets get added.
Dobromir,
I believe that is exactly what is causing this issue. While in preview mode the changed links are getting stored into our DB, and then when reloaded from the DB are never cleared or fixed. However, as I have said before I still haven't been able to actually find a point when the content of the rad editor is returning links with the target properties. It seems that it doesn't always happen, i.e. sometimes while in preview mode the links are exactly the way they should be when I grab the 'Content' property of the rad editor.

Could you please verify that you are using the latest version of RadControls for ASP.NET AJAX. If so, could you please provide a a video demonstrating the exact steps reproducing this problem along with the sample page.
We are still unable to reproduce this problem locally, and in order to be able to pinpoint the source of the issue we will need to examine it and debug it on our side.
At this point, the only possible workaround for this issue that I can suggest is to disable the Preview Mode. You can do this by setting the RadEditor's EditModes to Design and Html only, e.g.:
<
telerik:RadEditor
id
=
"RadEditor1"
runat
=
"server"
EditModes
=
"Design,Html"
>
</
telerik:RadEditor
>
Greetings,
Dobromir
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.


<script type=
"text/javascript"
>
function
clearPreviewMode() {
var
editor = $find(
"<%=RadEditor1.ClientID%>"
);
if
(editor.get_mode() == 4) {
editor.set_mode(2);
}
}
</script>
And wiring up to the OnClientClick event of the save button.
<
asp:button
id
=
"btnSave"
runat
=
"server"
Text
=
"Save Content"
OnClientClick
=
"clearPreviewMode();"
></
asp:button
>