Preserved HTML Editor Markup Plus

Description

This plugin preserves the user-generated HTML markup in the TinyMCE editor. Unlike other plugins this one allows developers to work in the HTML tab AND end-users to work in the WYSIWYG Visual tab at the same time! No longer will your HTML markup be completely munged into an unrecognizable form when you switch between those tabs. And you don’t have to hang your users/editors out to dry when you hand off the project with a disabled Visual tab.

IMPORTANT: Please read the installation instructions carefully. If you have existing content it will not render properly after activating this plugin until you use the Fix It Tools.

(One user didn’t read or follow these steps and panicked thinking I ruined their website.)

It also supports HTML5 Block Anchor tags in addition to other HTML5 elements, something that is currently not supported in WordPress via any existing plugins.

Installation

  1. Upload the plugin contents to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress Admin
  3. If you have existing content that needs fixing, use the “Fix Posts” feature under Admin > Settings > Writing: Fix Existing Content.
  4. You’re done!

FAQ

When will code tag issues be resolve?

This is a tough one. Not only do I have no idea why they’re being trumped, but I also have a daughter that will be born pretty soon :D, and a project at work that is about to get hectic πŸ™ I’ll try to fix it when I can but if you have the skills to help debug the help would be greatly appreciated.

Does this plugin actually disable wpautop?

Yes. And unlike virtually every other “disable wpautop” plugin this one will actually disable the client-side version of wpautop that runs when you switch between the Visual and HTML tabs. Even when using the P Tag mode or hybrid mode, wpautop is disabled and custom code is being used to inject paragraphs a little more intelligently.

What exactly do the “Fix Posts” or “Fix XXX” buttons do to my content?

Firstly, only use this feature if you are starting new with version 1.2. And definitely backup your database before running these tools, they have only been tested on two sites so far. And although in theory it is safe, you should still protect yourself.

The fix actually just runs wpautop one final time on the posts in the database. By default WordPress runs that function every time it displays content, so the raw data in the database is free of any paragraph tags & other formatting tweaks. The Fix buttons update the raw content in the database with the formatted version wpautop produces. And fortunately wpautop was designed in a way that it can be run multiple times so it shouldn’t mangle your content.

All of your post content will be converted, including past revisions. So if you need to revert a page or post after you activate this feature, you won’t have to reformat the previous version by hand.

The plugin also keeps track of when it was activated, so it will only modify content that was edited before the plugin was activated. So if you created some new content after activating the plugin and later realized all of your other content wasn’t displaying correctly it’s safe to use the Fix buttons without ruining your new content.

Reviews

Avoid it like the plague!

The plugin completely ruined the website.

I read the installation instructions and yet, the website is still broken.

TinyMCE Advanced problem

when i switch between text and visual mode
most the the code adding <code style=”display: none;”>

beside this , all work well. Keep it up good job !

Working as advertised, could use a better setup

Thank you for an excellent plugin that works as advertised πŸ™‚

They’re not joking about needing to follow the installation instructions! What a novel idea, installation instructions πŸ˜€ It could use a notice directing you to the actual settings and have a “settings” link on the plugin listing in the admin plugins section, but this is really a UI nit pick.

Seems to disable native WordPress post embedding

Overall a great plugin, but I believe there is a bug when trying to link to an internal post link. Usually, the link would be converted into a nice preview of the post you’re linking to with an image. Now, it doesn’t even become a link, just some paragraph text.

I was amaze until…

I am using the Divi theme of Elegantthemes, and I had to switch back to TinyMCE Advanced (it has a “keep tags” option) when I start fighting with <code style="display: none;"> that was appearing everywhere… Too bad, I was hoping to see a new solution for this basic WP missing option.

Big big thank you

I can now lay out my code in nice clean order – makes locating code items SO much easier.

Read all 31 reviews

Contributors & Developers

“Preserved HTML Editor Markup Plus” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.5.3

  • WP 4.3 compatibility.

1.5.2

  • Fixes for a few issues, including handling newlines in HTML, handling comments, handling secure sites, and handling IE10 javascript errors.

1.5.1

  • New TinyMCE version updates

1.4

  • Removed ‘show_ui’ filter for fix custom post type buttons.

1.3

  • Added support for inline JavaScript and CSS, as long as the wptexturize and convert_chars filters are disabled. (Thanks to ViennaMex for pointed out the problem.)
  • Added cache-buster for this plugin’s JavaScript includes to prevent upgrade issues seen in version 1.2 (Thanks to dreamdancerdesign, peterdub & abbyj for troubleshooting support.)
  • Special thanks to dreamdancerdesign for providing a live testing server – above and beyond.

1.2

  • Added support for user-specified newline behavior per post type
  • Added support for multi-line html comments (Thanks cwlee_klagroup!)
  • Fixed a bug found in TinyMCE related to Format drop down
  • Added tools to convert existing site content programmatically by post type.

1.1

  • Refactored for support of < php5.3 by replacing function references with static function array refs

1.0

  • Initial creation of plugin