Opened 15 years ago
Closed 15 years ago
#3671 closed Bug (fixed)
Inserting Page break is introducing new paragraph
Reported by: | Garry Yao | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | Core : Styles | Version: | |
Keywords: | Confirmed Review+ | Cc: |
Description (last modified by )
Reproducing Procedures
- Open the replace by class example page in FF;
- Click on 'New Page' to empty document content;
- Click on 'Insert Page Break for Printing' to insert a page break;
- Click on the newly introduced page break fake element;
- Expected Result: A new paragraph is created before it.
<div style="page-break-after: always;"> <span style="display: none;"> </span></div>
- Actual Result: Javascript error thrown.
<p> <br /></p> <p> <div style="page-break-after: always;"> <span style="display: none;"> </span></div> </p>
- Expected Result: A new paragraph is created before it.
Attachments (4)
Change History (18)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 15 years ago by
Description: | modified (diff) |
---|
Changed 15 years ago by
Attachment: | 3671.patch added |
---|
comment:4 Changed 15 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
After some investigation, the fixing is not only limited to #3657, here I'm proposing a way of avoiding those fake elements been incorrectly positioned due to 'fixForBody' option of the parser.
comment:5 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
Though the patch works, the parser should have no knowledge of the fake object system, so the transformation should go into fakeobject plugin instead.
Changed 15 years ago by
Attachment: | 3671_2.patch added |
---|
comment:6 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
Updates contained in the new patch:
1.The parser now is having a duo-pass parsing on the output html, which make fake elements have no more incorrect document position:
- The first pass for running the htmlfilter through, without formatter;
- The second pass for fixBody and also formatter, without any filtering; 1.The 'Page Break' plugin is now simply 'inserting' the fake element into the document, without worry about schema validation, which will be then taken care by the output parser.
comment:7 Changed 15 years ago by
This patch's having a dependency on the latest patch from #3609 until that's get fixed.
comment:8 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
Double parsing is not an option. A different solution needs to be found for it.
comment:9 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
So I would like to revert to the previous patch.
Changed 15 years ago by
Attachment: | 3671_3.patch added |
---|
comment:10 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Please add the changelog entry when committing.
comment:11 Changed 15 years ago by
Keywords: | Review- added; Review+ removed |
---|
The correct way of retrieving real element name of fakeelement should be the following instead:
element.attributes[ '_cke_real_element_type' ]
Changed 15 years ago by
Attachment: | 3671_4.patch added |
---|
comment:12 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:13 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Oh yes, that's much better.
Oops, fix wrong description.