ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

RTE produces inconsistent markup

May 16, 2012 5:16pm

Subscribe [2]
  • #1 / May 16, 2012 5:16pm

    Supply

    18 posts

    The new RTE field is producing inconsistent markup.
    when bolding text, sometimes it will wrap the text in <b> tags, and sometimes it will add <p style=“font-weight:bold”>.

    Sometimes it will wrap text in <p> tags and sometimes it won’t. I can’t figure out when it does which.

    It also seems to strip out <br> tags on output(tags are saved, but removed in the template).

    Is this a common problem or is it just me?

  • #2 / May 17, 2012 1:31pm

    Dan Decker

    7338 posts

    Hi Supply,

    Thanks for your question!

    I’m sorry for the inconsistencies you are seeing with RTE markup.

    Can you let me know what browser you are experiencing this with? Do there seem to be any differences between new entries and editing existing entries?

    Any more information or context you can provide would be awesome.

    Cheers,

  • #3 / May 17, 2012 4:39pm

    Supply

    18 posts

    Hi Dan,

    I’m using Firefox 12. No difference between new & existing entries.
    I have now noticed that the editor content & the markup shown by the ‘view source’ button do not match either.
    I can bold some text, then view the source - no changes to the underlying markup at all. toggle back and the bold is still there.

    Also, its not just br tags that are stripped form output - the markup is considerably different, see my post here: http://ellislab.com/forums/viewthread/216990/#1003750


    ..I just tested in Chrome, that appears to work correctly there….

    Aha! Found the problem. JS errors in the template variables accessory were breaking stuff.
    I think its ok now.
    Cheers.

  • #4 / May 17, 2012 4:45pm

    Supply

    18 posts

    hmm not entirely fixed. Visual mode & source mode still do not match.
    See screenshots of both modes.

  • #5 / May 17, 2012 4:48pm

    neuralynx

    62 posts

    I’ve experienced many issues with the RTE, and how it strips or adds tags.  I don’t know what you mean by “JS errors in the template variables accessories”. Are you referring to your own Javascript variables in your templates?

    Why should the browser have anything to do with the fact that the RTE is adding blank

    blocks to an empty text area? (and similar problems)

  • #6 / May 17, 2012 4:57pm

    Supply

    18 posts

    Template variables is an accessory addon. The version I had was throwing javascript errors.
    Browsers handle some javascript differently, so there are sometimes funky things going on especially with RTE’s.

  • #7 / May 22, 2012 3:28pm

    Dan Decker

    7338 posts

    Hi neuralynx,

    As Supply notes -

    Browsers handle some javascript differently, so there are sometimes funky things going on especially with RTE’s.

    That is most certainly true. IE 8/9 in particular.

    We are tracking several issues with the RTE, and all of the fixes so far involve changes to the compressed JS that ExpressionEngine uses.

    With that, I am going to move this into Community Help to keep the discussion going. Some of these issues will be addressed in an upcoming release.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases