Support » Requests and Feedback » Stop WordPress from adding /br/ and /p/ tags in text editor

Viewing 11 replies - 1 through 11 (of 11 total)
  • Until this bug is fix someone has provided a workaround (why doesn’t WordPress just work like this by default?????)

    Use the plugin: ‘Don’t muck my markup’

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What is the bug exactly?

    You can read the full discussion in the linked bug from years ago, or the description of the plugin.

    – Paste any HTML into the text editor of a page
    – View the page in a browser as a user
    – The page format is broken. This is because WordPress adds br and p tags everywhere

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What HTML for example? The problem with the thread you linked is that 10 people jumped in and clouded the issue.

    Make a new page and paste this in then view:

    <div >
    			<div >
    				aaa
    			</div>
    			<div >
    				bbb
    			</div>
    			<div >
    				adslfkj alfj lafjk dlfkjad flkjdf
    				<span >
    					WHY SO MUCH SPACE ABOVE ME? INSPECT ELEMENT TO SEE THE /br/s
    				</span>
    			</div>
    		</div>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I can see how that would cause an issue as the text isn’t within paragraphs already.

    All core features come down to whether it affects the majority of users. In this case I would think that WordPress hasn’t acted on this behaviour because it affects the minority. So, this would become plugin territory.

    The majority of users are not technical. A non-technical user wouldn’t necessarily know that they should put text inside of paragraphs. So WordPress helps them out by doing it for them. As WordPress is used by a quarter of the Web, I can see why core would contain this behaviour.

    Occasionally people may reach the situation where they have custom markup that shouldn’t use paragraphs and any other standard elements for its purpose. Like you have. You have a legitimate point, you just aren’t in the majority for it to be incorporated into core.

    Does this plugin do the job: https://wordpress.org/plugins/preserved-html-editor-markup-plus/ ?

    I see.

    I think the plugin you link to is for another plugin – TinyMCE.

    The one I found – https://wordpress.org/plugins/dont-muck-my-markup/ – works with standard WP, is just a checkbox at the bottom right of your page edit that is off by default, and is really small.

    If I were WP I’d consider including this by default as it is super helpful to brand new users like me, while occupying almost zero kb and zero screen estate.

    Hi there,
    I installed the plugin https://wordpress.org/plugins/dont-muck-my-markup/ and it doesn’t work, nothing changes… any other options to stop WP adding p and br ??

    Thank you!!

    Did you check the checkbox at the bottom right of your post after installing the plugn? You have to enable it per post I think.

    That’s all I can remember.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @masanz1280, You’ve already raised a support topic for that plugin. Let’s not make the same discussion in multiple places. If that plugin didn’t work, try another…
    https://wordpress.org/plugins/preserve-code-formatting/

    Ok thank you, I just wanted to know about other plugins that would be of help, thank you for this one, tried it but neither works…

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Stop WordPress from adding /br/ and /p/ tags in text editor’ is closed to new replies.