• Hallo, after i updated to the latest version, i get automatically added <p> around all paragraphs, when i switch from html to visual. if i deactivate “Keep paragraph tags” in the setting, i cannot see any br or p at all. So, how can i keep activated “Keep paragraph tags” in the setting but stop tinymce adding <p> to the text (and still see/add the <br> tags) when i switch from html to visual in the editor?

    in the functions.php i have:

    function tinymce_remove_root_block_tag( $init ) {
        $init['forced_root_block'] = false;
        return $init;
    }
    add_filter( 'tiny_mce_before_init', 'tinymce_remove_root_block_tag' );

    and

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    https://www.ads-software.com/plugins/tinymce-advanced/

Viewing 3 replies - 16 through 18 (of 18 total)
  • Hello,

    I think i also have a problem.
    I used the “keep ‘p’, ‘br’ tags” on one of my site to be able to make several newlines without creating new p tags

    For exemple, (with newline, shift+enter)

    this
    
    is
    test

    the editor would show (like intended) :

    <p>this<br/>
    <br/>
    is<br/>
    test</p>

    ‘the_content’ was also show the same.

    But now ‘the_content’ is :

    <p>this</p>
    <p>is<br />
    test</p>

    the double ‘br’ are not kept anymore. A new ‘p’ is started

    Hi, W2014,

    Do you still have this issue?
    I am facing the same problem. I figured out that the issue occur when a user who uses Mac Os X post something. Browser doesn’t matter. Chrome, Safari on Mac both have same issue.

    It is fine when I post something from Chrome on Windows.

    Any solution?

    Thread Starter W2014

    (@w2014)

    The bug is still there, no change, TinyMCE Advanced or wordpress does not accept having plain text or double br, it has to be wrapped in something. There are many topics on this, but none worked for me, i did not try this , now i have a different approach, i leave it like it is, because I have many WordPress installations and i would have to make these changes overall. So, crazy that there is no plugin that solves this, or even that TinyMCE Advanced is not addressing this issue.
    On the other Hand, the “br” – element is “a bit strict” defined in html5: the-br-element, so probably it is bad practice to use plain text or double br, so wordpress automatically corrects this.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘automatically added p – bug still there in visual editor’ is closed to new replies.