Discover, trust, install: FAIR 1.0 is here

Plugin Banner

TinyMCE Clear Float

by Philipp Bammes

Version: 1.3.2

Download
Description

Adds a button to the WordPress TinyMCE editor to clear floats.

  1. Before: Floated images in the editor. The second image overlaps the first.

    Before: Floated images in the editor. The second image overlaps the first.

  2. After: Added clear tag (see new icon in second toolbar).

    After: Added clear tag (see new icon in second toolbar).

  3. Markup in the Text Editor (notice <code><br style="clear: both;"></code>).

    Markup in the Text Editor (notice <br style="clear: both;">).

Which HTML markup does the plugin use ?

Line breaks with inline styles (<br style="clear: both;">).

Note: TinyMCE wrapps line breaks in paragraphs which may lead to additional margins depending on your theme. To prevent these margins paste the following in the “Custom CSS” part of the Customizer:
p > br[style=”clear: both;”]:only-child {
content: ”;
display: block;
margin-bottom: -1.5em;
}
The value 1.5em corresponds to your theme’s margin-bottom of <p> tags.

Works perfectly, thanks!!

By SforSteph on February 15, 2019

The issue of text appearing up between two images (one floated left, one floated right) was driving me mad and would've looked awful to my client. This plugin quickly and easily solved it - thank you!!

Easy to use

By Certa Web (certa) on June 29, 2018

The plugin is very easy to use and a great help for our web editors.

Perfect

By Kimball31 on September 7, 2017

Thanks so much!

Solve my problem. Easy to use and very handy.

By Alexandre Gaeta (agaeta) on April 28, 2017

Save some work using this plugin... It´s an easy and similar to a CLEAR:BOTH CSS TAG, that helps images and blocks alingment .

1.3.2 (08/01/2018)

  • Fix: Rare bug (introduced in v1.2.0) that prevented parsing of deprecated clear element if it contained non breaking space (<div style="clear: both;">&nbsp;</div>)

1.3.1 (05/20/2018)

  • Fix: Bug (introduced in v1.3.0) that hid the TinyMCE content if no clear element was found

1.3.0 (05/19/2018)

  • Fix: Replaced regular expressions for switching clear elements with placeholders and vice versa with DOMParser to reliably match all possible clear element notations (e. g. <br style="clear: both;">, <br style="clear:both">, <br style="clear: both;" />, <br style="clear:both" />)

1.2.2 (05/25/2017)

  • Fix: Rare bug (introduced in v1.2.0) that caused TinyMCE to remove the <br /> tag
  • Fix: Bug (introduced in v1.2.0) that prevented the plugin from beeing translatable (finally)
  • Misc: Bumped “Requires at least” to WordPress 4.6

1.2.1 (03/30/2017)

  • Fix: Bug (introduced in v1.2.0) that prevented the plugin from beeing translatable

1.2.0 (01/26/2017)

  • New maintainer; first update after seven years
  • Feature: Removed clear left and clear right buttons (see FAQ section)
  • Misc: Completely refactured plugin code

1.1 (05/10/2010)

  • Feature: Added HTML block in the style of WordPress

1.0 (04/28/2010)

  • Initial release
  • Version:Version: 1.3.2
  • Active installs:Active installs: 10K
  • Last updated:Last updated: 01-08-2018
  • Requires:Requires: 4.6
  • Tested:Tested: 4.9.26
Average rating:5 out of 5 stars.
  • Number of ratings: 6 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 0 ratings
  • Number of ratings: 0 ratings
Back to top