Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David 11 posts 122 karma points
    Mar 26, 2013 @ 23:20
    David
    0

    Cannot render <a> tag properly in Rich Text Editor

    I'm in the middle of converting a website to using Umbraco.

    I have this in the html:

    <u class="labelBlue"><a id="more2_en" onclick="return toggleMe('sect_faq_en', 'more2_en')">more</a>...</u>

    But when I put it in Rich Text Editor, it becomes:

    <span class="labelBlue" style="text-decoration: underline;"><a id="more2_en" onclick="return toggleMe('sect_faq_en', 'more2_en')"></a>more...</span> 

    The text 'more' is rendered outside of the <a></a>, causing the javascripting not working.  Is it a rendering bug in Umbraco?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 26, 2013 @ 23:36
    Jan Skovgaard
    0

    Hi David and welcome to our :)

    What version of Umbraco are you using? Depending on the version Umbraco is using tidy to clean the entered markup and the <u> tag for instance is not allowed. And it could seem like it has a hard time cleaning it all properly.

    Looking forward to hearing from you.

    /Jan

  • David 11 posts 122 karma points
    Mar 27, 2013 @ 20:27
    David
    0

    Thanks Jan!

    I'm using the latest version 6.02. 

    And I'm trying to change it to

    <span class="labelBlue" style="text-decoration: underline;"><a id="more2_en" onclick="return toggleMe('sect_faq_en', 'more2_en')">more</a>...</span> 

    But the text 'more' always gets rendered outside of the <a> tag. :(
  • David 11 posts 122 karma points
    Mar 27, 2013 @ 20:38
    David
    100

    Okay I think it works now...

    I think if the 'href' attribute is missing from the<a> tag, somehow the linked text is rendered outside of the tag....

    Now this is working:

    <span class="labelBlue" style="text-decoration: underline;"><a id="more2_en" href="#" onclick="return toggleMe('sect_faq_en', 'more2_en')">more</a>...</span> 

Please Sign in or register to post replies

Write your reply to:

Draft