WordPress.org

Ready to get started?Download WordPress

Forums

tinyMCE adding empty p tags to empty meta fields (6 posts)

  1. zactoff
    Member
    Posted 3 years ago #

    I'm using wordpress (3.1.3) with the tinyMCE advanced plugin (3.3.9.2) with 'stop removing p tags etc.' checked in the settings.

    I have meta-fields added to some pages by the templ33t plugin (based on page.ly multi edit) to give me extra editable content fields.

    When I add content to a meta-field, then delete it, it leaves <p><br _mce_boges="1"></p> in the editor, when I subsequently delete these entities, they appear to be gone in the editor, but still show up when the page is served.

    I don't understand why I cannot clear out my text field completely and leave it blank. The reason this is a problem is that I have a styled <p> class that has a background, so where a blank <p> is being being displayed on the page, it has a background to it which is breaking my design.

    Example here: (Excuse the f*cked formatting, it truly is my dev site) http://www.modifiedforhunting.com/boo/t/ - the grey borderless box on the left hand side should not be there, it is the spurious content from the supposedly empty meta-field.

    Hi, i'm aware that this issue has been discussed at length in various places here, but I have not seen any solutions.

    All I want to do is to be able to delete all content from a text field, I don't see why there needs to be anything left in there for caret handling (I presume this is the reason the tags are inserted), it should never be selectable when empty.

    Any suggestion gratefuly gratefuly received, thank you,

    Zac

  2. zactoff
    Member
    Posted 3 years ago #

    Bump!

    Anyone moderating this?

    Live example here: http://www.bookaid.org/our-work/ empty <p> with is on left hand side between Our Work & Our work In Africa panels

    TY!

  3. Ryan Willis
    Member
    Posted 2 years ago #

    Zac, apologies for the delayed reply, I've had my focus elsewhere and most support requests I've received came through my blog. In any case, I will look into the issue though it is unclear whether it is Templ33t specific or not. The new version will be released very soon and this concern may already be addressed in the new code. Stay tuned.

    Ryan

  4. vincent_eins
    Member
    Posted 2 years ago #

    Hallo,

    Sadly, I have the same problem and it's driving me crazy. I have the latest version of Tiny MCE Advanced (3.4.2.1) but it also occured in the previous releases. The box to stop deleting line break tags in the settings menu is checked, but the handling of linebreaks in the editor is far away from beeing understandable. He doesn't react (in the html editor) wether on "normal" line breaks via the enter key, nor on shift-enter line-breaks. Furthermore he seems to add <p> or </p> tags quite randomely but mostly at the top of the page. I've been looking over a hundred of articles on this but none of them is helpful.

    Is there any progress on this issue?
    (I can provide further information on my setup if I know what you need.)

    THX in advance

  5. cornhustlah
    Member
    Posted 2 years ago #

    bump.

    i am also experiencing this problem .. any new news?

  6. Ryan Willis
    Member
    Posted 2 years ago #

    There is an interesting conversation about this issue here. The extra element is appended by TinyMCE on purpose to defeat an issue with FF/Webkit browsers. In the posts, they mention a couple ways to handle this. One is to just add the following to your stylesheet: br[mce_bogus] {display: none;}. This will hide the bogus line break item. You can also add cleanup: true to the TinyMCE init script, which I don't see in the initial WordPress configuration.

    There is some checking to do on TinyMCE versions and WordPress' custom integration, as well as Templ33t's tab switching and how it triggers the content filtering. That said, this seems to be an issue of configuration.

Topic Closed

This topic has been closed to new replies.

About this Topic