Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

On a new drupal 7 installation, I'm trying to get line breaks to show up correctly when saved. I have wysiwyg and tinymce installed through using the panopoly distribution. When I try to do more space after a paragraph (by hitting enter twice), it will generate two empty paragraph tags, such as <p></p><p></p>. This however won't provide the needed space as they are empty. In an earlier (drupal 6) project, when I tested this behavior it would insert paragraphs with &nbsp; in them which correctly displayed the line breaks. For example: <p>&nbsp;</p><p>&nbsp;</p>

Is there any way to get this behavior back in Drupal 7?

I've played around with the wysiwyg settings, and text formats, but I can't find a combination of settings that will work.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It turns out this has something to do with the "WYSIWYG filter" under text formats (admin/config/content/formats). Disabling this gave my non-breaking space back. You would probably want to adjust the configuration rather than just turning it off.

share|improve this answer

The followin setup works in my Drupal 7 TinyMCE configuration:

  1. Turn off the WYSYWIG filter on the admin/config/content/formats page.
  2. Configure the 'Limit Allowed HTML tags' filter to allow for

    and
    tags.

Note: Filters are configured at admin/config/content/formats/MY_FILTER_NAME

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.