WYSIWYG Force Linebreaks - Don't mess up your text!

Wysiwyg Linebreaks allows users of wysiwyg editors to save and open markup from their website with linebreaks instead of <p> and <br /> tags.

You can choose between two different methods:

  • Force linebreaks: Your content will always preserve whitespace/linebreaks around blocks of text, rather than paragraph and break tags.
  • Convert linebreaks: Your legacy content will appear correctly in your WYSIWYG editor, then the content will be saved with the markup added by the editor).

The 'force' option is useful for sites where you would like to edit content both with and without wysiwyg editors (so you don't have to manually enter paragraph and linebreak tags everywhere).

Basically, you can edit content that was originally created without a wysiwyg editor (for instance, simply using Drupal's Filtered HTML format, a user may hit enter twice to create a new paragraph—no <p> tag wraps the block of text in this case), without having to deal with the headache of reformatting everything inside the wysiwyg editor.


Drupal 8

This module works with CKEditor in core. No extra contrib modules required.

Drupal 6/7

This module requires the Wysiwyg module to do anything useful. It does not work with the standalone CKEditor or FCKEditor module, but works with those editors in combination with Wysiwyg.


Drupal 8

Install the module, then go to the Text formats and editors page (admin/config/content/formats), configure a format where CKEditor is being used, and choose a conversion method under the Linebreaks settings.

Drupal 6/7

Install the module. To enable this plugin, you need to edit one of your Wysiwyg profiles (admin/config/content/wysiwyg) and check either the 'Force linebreaks' or 'Convert linebreaks' option under "Buttons and plugins".


#D8CX: I pledge that Wysiwyg Linebreaks will have a full Drupal 8 release on the day that Drupal 8 is released. Fulfilled!

Module created by Jeff Geerling of Midwestern Mac, LLC.

Supporting organizations: 

Project information