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.

Rich Text editor removing <p> tags from text

May 12, 2013 12:13pm

Subscribe [23]
  • #31 / Aug 05, 2013 6:47pm

    DigitalDoctors

    76 posts

    I had something similar to this where the p tags were being stripped.  In my case, I think the problem was that I had originally created the channel field as a normal textarea then changed it to RTE later on.  It would appear that somewhere in the change, something is missed.  Deleting the channel field and recreating it fixed it for me.

  • #32 / Aug 30, 2013 12:06pm

    johnboat's avatar

    johnboat

    61 posts

    FYI this is still an issue in 2.7. I applied the fix suggested in this thread and it worked (I think, appears to be displaying correctly after I re-save posts - but don’t know if some other problem will crop up because of the edit).

    If that simple line of code is all that is needed, couldn’t someone @ EE update that before next point release?

    *EDIT* I take it back, it still strips out some code. For instance if you break a line in a Heading tag.

  • #33 / Sep 03, 2013 8:24am

    dq3221's avatar

    dq3221

    2 posts

    why does the sign be hided?

  • #34 / Sep 13, 2013 3:27pm

    interactive @dvl's avatar

    interactive @dvl

    144 posts

    I have line breaks but now when I add a link it removes spaces between words. Any fix for this? Thanks 🐍

  • #35 / Sep 17, 2013 10:33am

    Tassell Design

    1 posts

    I have line breaks but now when I add a link it removes spaces between words. Any fix for this? Thanks 🐍

    Line breaks aren’t working for me (EE 2.6.1), but I am experiencing this strange issue with spaces being removed either side of a link. E.g. the below code will display like this: This is a sentencewith a linkand other text.

    This is a sentence <a href="#">with a link</a> and other text.

    Doesn’t matter how many times you put the space back into code view, they will be removed. Adding a space in RTE view results in the following code on the front-end:

    This is a sentence <a href="#">with a link</a> and other text.

    Really odd! Any ideas?

  • #36 / Sep 23, 2013 1:43pm

    tomotechi's avatar

    tomotechi

    23 posts

    We just experienced RTE field not displaying paragraph tags on the index.html template, but does do so for the exact same entry on other templates inside this group.

    Switched back to standard TE field and the problem went away.

    FYI

    EE2.6.1

  • #37 / Oct 10, 2013 9:01pm

    adamprocter's avatar

    adamprocter

    228 posts

    Default EE 2.7.2 RTE field add html p element.

    field1 = text area
    field2 = RTE

    Template is

    {field1} {field2}

    It outputs

    BLAH
    BLAH 2

    So i have to change

    array(
        'text_format' => 'xhtml',
        'html_format' => $this->row['channel_html_formatting'],

    to

    array(
    
        'html_format' => $this->row['channel_html_formatting'],

    I have to thus edit ft.rte.php every updated

  • #38 / Oct 17, 2013 11:53am

    adamprocter's avatar

    adamprocter

    228 posts

    RTE is surrounds automatically by a

    otherwise… but if you edit like I have you remove the p’s from being created from within a RTE - this really does not work well.

  • #39 / Oct 17, 2013 12:02pm

    adamprocter's avatar

    adamprocter

    228 posts

    I cant use the RTE at all which is frustrating to say the least. If I turn this option ON
    I just get so much extra code that all my RTE boxes break

    // 'text_format' => 'xhtml',

    which I guess means my RTE field are behaving like plain none formatted textfields in reality

  • #40 / Oct 17, 2013 12:08pm

    adamprocter's avatar

    adamprocter

    228 posts

    Ok so I thought ok change to none

    'text_format' => 'none',

    same as commented out I think but

    In RTE if client uses B i , header etc this is respected yet the p is removed ?

    So why is RTE adding p’s around the box ? If it did not do this I think it would work, or… just fix textformat = none and then when user overides in RTE box make sure to respect p as well as other elements?

    hope that makes sense someone

     

  • #41 / Jan 02, 2014 4:55pm

    mwadvadmin

    2 posts

    Hate to revive an old topic like this, but I am experiencing the same problem. I am on 2.7.3 and this issue is supposed to be resolved, but the formatting is still being stripped from my RTE fields.

  • #42 / Feb 11, 2014 9:43am

    Eric N's avatar

    Eric N

    28 posts

    I’m having a similar problem, but I am importing items into the RTE field and it is removing P tags on entry and making it one big mess of a paragraph instead of nicely formatted text that I am importing as.

    It leaves the other tags alone, b a i etc, but Its really annoying to have to go in and reformat the breaks.

    I would go to plain text area but the same field is used by the content editors and they have no clue on formatting things and are used to RTE type editing, and it works for them.

    Exampe would be

     some text.
    some more text.

    which should read:
    some text.
    some more text.

    but it converts it to

    some text some more text

    And outputs like:
    some text. some more text.

    I’m on 2.7.2 if that helps.

    Edit:
    It also is not working well with UL and LI tags - its converting them to

    & lt;ul& gt;

    (no spaces but it wouldn’t display here right otherwise)
    This happens if I use the unordered list feature in the RTE or if I manually add the Unordered List myself

  • #43 / Feb 20, 2014 9:20am

    Dyad's avatar

    Dyad

    29 posts

    I am experiencing these same problems, on multiple sites. Two I know for sure are problematic are running 2.6.1.

    P tags being stripped out, and spaces surrounding B, I, and A tags are removed. And even if you correct it in code and trick it into saving the formatting correctly once, the next time you save, it strips everything out again.

    Definitely not ideal for client use. EE’s rich text editor has been one of the most frustrating editors I’ve ever used, and it seems to have gotten worse, not better.

    Anyone have any temporary fixes for the stripping of P tags?

  • #44 / Mar 03, 2015 8:11pm

    axebox

    1 posts

    I am reproducing this bug. Is this supposed to be fixed?

    The other HTML works, but EE is stripping out p tags.

  • #45 / Sep 09, 2015 5:23am

    JDB360

    1 posts

    Is there a fix for this, I’m using EE v2.8.1

    p tags are getting stripped from my rich text field.

    If I copy and paste html containing p tags into this filed they are retained first time I save.

    If I reopen the entry to edit the p tags have been removed.

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

ExpressionEngine News!

#eecms, #events, #releases