WordPress’ visual editor comes complete with plenty of eccentricities – some distracting, some plain irritating.
But don’t worry – the purpose of this brief post is not to lay hate down on TinyMCE – instead, I want to offer up a quick and easy shortcut fix for a common issue that used to drive me around the bend.
You may wondering what the aforementioned common issue is. Here is a screenshot:
As you can see, the paragraph after the numbered list seems to have lost its bottom margin. When you switch views to the HTML editor, you can see why:
For reasons unbeknownst to me, TinyMCE has seen fit to wrap the paragraph after the list in <div> tags. This results in a loss of formatting which varies depending upon your theme’s CSS. I’m not entirely sure what precise circumstances prompt this issue, but it only (but not always) seems to happen after lists.
This bug used to be a real pain in the ass, as I would have to go into the HTML editor, scroll to the relevant part of the post, and remove the <div> tags. This was especially irritating when working with a long post.
Fortunately, I discovered an easy fix. All you need to do is place your cursor within the div-wrapped paragraph in the visual editor, and hit Ctrl + 1 (or Cmd + 1 on Macs) twice. This will first wrap the paragraph in <h1> tags, then remove those tags – and the <div> tags at the same time. Hey presto! No more divs, and done in a fraction of the time it would take to do manually.
Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Out of all the WordPress ecommerce plugins available, MarketPress has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Thanks Tom very useful tip, don’t like the way it sometimes removes the tags.
My pleasure Colin!