target attribute overriden when switching to Preview mode

5 posts, 0 answers
  1. Sébastien Nunes
    Sébastien Nunes avatar
    30 posts
    Member since:
    Mar 2010

    Posted 03 Dec 2010 Link to this post

    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 ?

  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 03 Dec 2010 Link to this post

    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.

  3. Sébastien Nunes
    Sébastien Nunes avatar
    30 posts
    Member since:
    Mar 2010

    Posted 03 Dec 2010 Link to this post

    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
  4. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 06 Dec 2010 Link to this post

    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.
  5. Sébastien Nunes
    Sébastien Nunes avatar
    30 posts
    Member since:
    Mar 2010

    Posted 13 Dec 2010 Link to this post

    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.
Back to Top