Opened 13 years ago
Closed 13 years ago
#8604 closed Bug (invalid)
Redundant blank space in the html output for one empty paragraph
Reported by: | IBM_RQM | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Output Data | Version: | |
Keywords: | Cc: |
Description
Severity: High
This issue occurs for the empty paragraph.
The steps to reproduce:
- In the editor input one empty paragraph.
- Using CKEditor's getData() method to get the html data of the whole text.
Expected Result: The empty paragraph's html code is '<p></p>' Actual Result: There is one redundant blank space in the html code, i.e., '<p> </p>'
Attachments (3)
Change History (6)
Changed 13 years ago by
Attachment: | html_code_getby_ckeditor's_getData().png added |
---|
Changed 13 years ago by
Attachment: | Input_empty_para_in_editor.png added |
---|
Changed 13 years ago by
Attachment: | View_dom_on_firebug_when_edit_in_editor.png added |
---|
comment:1 Changed 13 years ago by
comment:3 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 3.6.2 |
Correct the Expected Result, the empty paragraph's html code is '<p><br/></p>'
This is how Firefox sees those nodes (the same is with Opera). By default CKEditor fills empty blocks with to render them correctly.
You can change this behavior when using:
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.fillEmptyBlocks
That way you will have <p></p>
insttead of <p> </p>
You can check this when inserting two empty paragraphs in source mode, switching to wysiwyg and then using getData().
If you are wondering why by default this does not work with one paragraph then check this link: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.ignoreEmptyParagraph
Correct the Expected Result, the empty paragraph's html code is '<p><br/></p>'