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

target attribute overriden when switching to Preview mode

4 Answers 55 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Sébastien Nunes
Top achievements
Rank 1
Sébastien Nunes asked on 03 Dec 2010, 03:15 PM

Hi,

We have a strange behavior with the target attribute on links: 
- When we add a link in HTML mode an specify a target attribute other than "_blank" then switch to the Preview mode and back to the HTML mode, the attribute is renamed original_target=... and a new target attribute is added an it's value is always "_blank". Lik this:

<a href="http://www.google.com/" target="_blank" original_target="_top">www.google.com</a>

We had this issue while using version 5.7.1 and we've been told to upgrade to 5.8.4 but after the upgrade the problem is still present.

What should I do ?

4 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 03 Dec 2010, 03:58 PM
Hello Sébastien,

I tested the problem with the latest version of RadEditor for MOSS 5.8.4 and I was not able to reproduce it. For your convenience I created a small video with my test http://screencast.com/t/x7NNAMis9.

Inform me if I am doing anything wrong in my test and provide me with the web.config file of your MOSS site and the ToolsFile.xml, ListToolsFile.xml, ConfigFile.xml, ListConfigFile.xml, which are located in the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.8.4.0__1f131a624888eeed/Resources/ folder.


Best wishes,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sébastien Nunes
Top achievements
Rank 1
answered on 03 Dec 2010, 04:32 PM
Hi,

Actually the only target value for which it works is the _blank which you tested. Here are the detailed steps to reproduce:
  1. Enter the editor and switch to HTML mode
  2. Paste the following html code:
<a href="www.google.com" target="_top">Google.com</a>

3. Switch to Preview mode (don't switch to Design mode first)
4. Switch back to html mode and you'll see that your code is changed to:
<a href="www.google.com" target="_blank" original_target="_top">Google.com</a>

Here are the files you asked for: http://dl.dropbox.com/u/9317951/TelerikSupportFiles.zip
0
Stanimir
Telerik team
answered on 06 Dec 2010, 11:05 AM
Hi Sébastien,

I tested the issue with the provided files but I was not able to reproduce it. By reviewing your ConfigFile.xml I can tell that you set the OnClientLoad property of RadEditor. Could you provide me with the javascript code, which is executed on the OnClientLoad event? In general the best place of inserting this code is the MOSSEditorTools.js file which is located in the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/ folder. This will make my test more accurate.

Greetings,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sébastien Nunes
Top achievements
Rank 1
answered on 13 Dec 2010, 02:53 PM
You're right, the problem was coming from the custom javascript in the MossEditorTools.js. Sorry about my post, a previous developer changed the MossEditorTools.js and I didn't know about it.

Thanks for your help.
Tags
WebParts for SharePoint
Asked by
Sébastien Nunes
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Sébastien Nunes
Top achievements
Rank 1
Share this question
or