Site logo

Archived topic

Sections: inserted automatically & copy request

5 replies · Started by Heiko on September 28, 2017

Viewing posts 1–6 of 6

Hello!

1) If I use sections and the "code"-tab, the editor automatically inserts linebreaks (<br>). In the visual editor this is fine, of course. But if I use the code-editor, I do not want to have any <br>s inserted. How can I prevent the editor from doing this?

2) A feature request: It would be nice to copy sections on one page and to copy sections to another page.

Thanks in advance and for your great work!

Heiko

EDIT: Same problem with <p> espacially after images.

Hi there,

You're using the "Text" tab in the editor? It should function the same as the visual editor when it comes to adding these elements, as it's caused by WP's wpautop function which is applied to all content.

Can you try #1 on this page?: https://docs.generatepress.com/article/debugging-tips/

Hi Tom!

Yes, it is the "Text" tab. On my WordPress it is called "Code", so maybe it is "translated"...

Disabling plugins did not have any effect. Could you maybe create a new feature under "Deactivate Elements", where you can choose to disable wpautop for a specific page? It would be nice to have wpautop disabled for "Text"-tabs. :)

Until you maybe release this feature, I now use ps-disable-auto-formatting what exactly does it. And I hope it has no side effects...

edit: This plugin does not work corectly...

Thanks for your help!

Heiko

Hi there,

This feature would definitely be plugin territory (like how you are doing now) as not a lot of people use wpautop.

Glad you found the solution!

The plugin I mentioned above does not work correctly, so I edited my post and removed the link to it. It is not compatibel to the current WordPress version and has not been updated for two years... :-/

Now I use "Raw HTML" and "Disable automatic paragraphs" for pages, where I use the text mode.

Thanks for reporting back!

This archived topic is closed to new replies.