Opened 15 years ago
Closed 14 years ago
#5638 closed Bug (fixed)
‘ignoreEmptyParagraph’ configuration doesn't work in enterMode=BR
Reported by: | Garry Yao | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.4 |
Component: | Core : Output Data | Version: | 3.0 |
Keywords: | Confirmed Firefox HasPatch | Cc: | nospam@… |
Description
Environment
Firefox, config.enterMode = CKEDITOR.ENTER_BR, config.ignoreEmptyParagraph = true;
Reproducing Procedures
- Open any of the sample page and click on 'New Page' to clear content.
- Swtich to source.
- Actual Result: There's one single <br /> left in content .
Attachments (1)
Change History (10)
Changed 15 years ago by
Attachment: | 5638.patch added |
---|
comment:1 Changed 15 years ago by
Keywords: | Review? added |
---|
comment:2 follow-up: 3 Changed 15 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | new → assigned |
comment:3 Changed 15 years ago by
Cc: | nospam@… added |
---|
comment:4 follow-up: 6 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
I don't notice any problem about "text getting bumped down upon initial typing", but if the user inserts several empty lines at the end of the content, they go away one at a time with each switch between source & design, so we have a new problem.
As the bogus node is marked as "_moz_editor_bogus_node" maybe that can be used to filter it out in the node: in the getData method of the wysiwygarea plugin, after getting the initial content, test (only for gecko) if the last node of the DOM is a br and has this attribute and if it's true then replace it from the end of the document.
How does that sound?
comment:5 Changed 15 years ago by
they go away one at a time with each switch between source & design, so we have a new problem.
Unfortunately it's a bug that exists now, I've opened #5766 for it.
comment:6 Changed 15 years ago by
Keywords: | Review- removed |
---|
Replying to alfonsoml:
As the bogus node is marked as "_moz_editor_bogus_node" maybe that can be used to filter it out in the node: in the getData method of the wysiwygarea plugin, after getting the initial content, test (only for gecko) if the last node of the DOM is a br and has this attribute and if it's true then replace it from the end of the document.
Firfox bogus nodes are imitated into normal BR, it's safe to just remove the last <br> of document.
But the problem itself is off the scope on this ticket, it should be instead discussed at #5293.
comment:7 Changed 15 years ago by
Keywords: | HasPatch added |
---|
comment:8 Changed 14 years ago by
Owner: | changed from Garry Yao to Frederico Caldeira Knabben |
---|
This is definitely supposed to be handled by #5293.
comment:9 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Confirmed it fixed at #5293.
I tested your patch, but no luck to totally solve the issue. Pls see http://drupal.org/node/798932#comment-2979676. I'm using CKEditor 3.2.1.