Closed (fixed)
Project:
Wysiwyg
Version:
7.x-2.1
Component:
Editor - CKEditor
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 May 2013 at 09:26 UTC
Updated:
24 May 2013 at 21:51 UTC
I installed CKeditor (3.6.2.7275)
EnterMode = BR
When I put a link in content.
If I click in the end of link, and save, there is no problem.
EX:
http://drupal.org
test
But if I want to edit it, the content will become this:
http://drupal.org test
The br tag be removed.
This confuse us because if we want to edit our article, we must adjust line break again.
Comments
Comment #1
twodThat's most likely because you've got the "Limit allowed HTML tags"-filter enabled in the text format you're using for the field.
That filter will remove any tags not added to its whitelist during content rendering. The br tag is not in that list by default becase it's often used for reasonably limited formats and together with the "Convert line breaks into HTML (i.e. <br> and <p>)"-filter, which runs after the tag filter and creates br and p tags from newlines.
You'll need to add br and p tags to the whitelist in the settings for the "Limit allowed HTML tags"-filter on admin/config/content/formats/FORMAT_NAME to prevent Drupal's serverside filters from removing the br and p tags created by the editor before the contents were stored in the database. Preferably, you should also disable the "Convert line breaks into HTML" filter as that may insert additional br and p tags based on the source code formatting applied by the editor (if enabled).
If you want more control than what is offered by the limited "Limit allowed HTML tags"-filter, I suggest using WYSIWYG Filter instead. It gives much more control over what tags, attributes and style properties (always removed by the standard filter) are allowed in your content.
I hope that clears things up. If not, please mark this "active" again.