Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    Jun 12, 2013 @ 11:35
    Craig O'Mahony
    0

    Richtext Editor always add 'span' element

    Hiya Folks,

    Got a weird one (well I think it's weird!).

    I've editing some content (The Richtext editor is associated to a stylesheet so users can select classes from the 'style' dropdown). So for instance if I type the words 'Hello this is Craig' I would expect to the see the HTML render as....

    <p>Hello this is Craig</p>

    But what is atually being rendered is....

    <p><span>Hello this is Craig</span></p>

    And I've no idea where this span is coming from!!! It's not in the stylesheet anywhere!

    It wouldn't be such a biggie but it's stopping me from being able to apply classes to the content as I can't target areas of content correctly. For instance if I want to add a class to a link, it's actually adding the class that's wrapped around the link. 

    This one's driving me mad!! 

    Any ideas anyone??

  • Lachlann 344 posts 626 karma points
    Jun 21, 2013 @ 13:38
    Lachlann
    0

    Hi Craig,

    That is a strange one. what version of Umbraco are you using? Also can you take some screenshots of how your rich text editor styles are defned?

    Cheers

     

    L

  • Leroy Meijer 5 posts 25 karma points
    Sep 04, 2013 @ 15:05
    Leroy Meijer
    0

    Hi,

    I just come accross the same problem, I'm using Umbraco 6.1.3 I have added screenshots:

    Datatype: 

     

    HTML code: 

     

     

    Result in Chrome: Weird bug if you ask me :S

     

    Just figured out that when you adjust the HTML of the richcontent editor you need to manually delete the <p> and <span>. But then when you click save it automaticly ads the <p> again!

     

     

     

     

     

  • Craig O'Mahony 364 posts 918 karma points
    Sep 04, 2013 @ 15:13
    Craig O'Mahony
    0

    The only thing that i noticed in my solution was that I'd associated the CSS to the rich text editor. So I removed this association and then the RTE stopped adding the <span> class. Give that a whirl.

    Craig

Please Sign in or register to post replies

Write your reply to:

Draft