Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Andrew Ozz

    (@azaozz)

    Hmm, I just re-tested this and is seems to be working here. Can you check if the editor settings are correct? On the “classic” Edit Post screen open the browser tools and go to “Console”. Then paste this in it and press Enter:

    tinymce.activeEditor.settings.wpautop

    Should return false. Then repeat with this:

    tinymce.activeEditor.settings.tadv_noautop

    Should return true.

    I’ve updated this a bit in the latest TinyMCE Advanced version (coming out together with WP 5.2.1 tomorrow). It’s back to having only one setting for keeping P tags. It should “just work” in the Classic block in the block editor ??

    Thread Starter Rostyk Chaikivskyi

    (@rostyk-1)

    Thanks for a quick response.

    When I enable “Edit as HTML” in the Classic Paragraph in the block editor (https://prnt.sc/nqybqu) and then I’m checking in Console – everything works just like you’ve described.

    But when I enable the “Text” tab in the Classic Editor (https://prnt.sc/nqyemb) and check in Console – both return true.

    I hope this will help ??

    Plugin Author Andrew Ozz

    (@azaozz)

    Hm, it seems there is another plugin that resets the wpautop editor setting in the classic editor. Do you have a plugin that adds some features to the classic editor or to the “classic” Edit Post screen?

    You can try re-setting that option “by hand” from the browser console, but it’s no way to always have to do that manually ??

    Switch to the Visual tab in the classic editor then paste this in the console and press Enter:

    tinymce.activeEditor.settings.wpautop = false;

    Then check if everything works as expected. If yes, perhaps try to figure out which plugin may be re-setting that option. Worst case, will need to disable plugins one by one until you find the culprit.

    • This reply was modified 5 years, 9 months ago by Andrew Ozz.
    Thread Starter Rostyk Chaikivskyi

    (@rostyk-1)

    Hi Andrew,

    Thanks for your help.

    Here is the list of my plugins (https://prntscr.com/nrsjli) and I don’t think that some of them add features to the classic editor.

    Actually, I’ve checked the classic editor (the_content) in the single page of custom post type and paragraphs and line breaks appear there!

    So the only issue appears in the ACF Pro WYSIWYG field and I think that this is related to ACF Pro combined with TinyMCE Advanced.

    Hi,
    same problem for me, for <p> I can solve hadding style (TinyMCE will keep it) but for <br> do you have a solution ?

    Plugin Author Andrew Ozz

    (@azaozz)

    Yeah, it may be that another plugin (in this case ACF Pro) resets the use of wpautop inside the editor. This behaviour is specifically allowed in WordPress so plugins can collaborate better.

    I’d suggest contacting support for the other plugin and asking ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to keep paragraph tags in the Classic Editor (TinyMCE)?’ is closed to new replies.