Opened 15 years ago
Closed 14 years ago
#5079 closed Bug (fixed)
Page break in lists move to above the list when you switch from WYSIWYG to HTML mode and back.
Reported by: | Joe Kavanagh | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.4 |
Component: | General | Version: | SVN (CKEditor) - OLD |
Keywords: | IBM | Cc: | dchojna@…, Frederico Caldeira Knabben |
Description
Enter a list with a few items. Add a page break in the middle of the list. Switch to HTML mode and back to WYSIWYG mode. Observe that the page break has moved to before the list
Attachments (4)
Change History (21)
comment:1 Changed 15 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | → CKEditor 3.3 |
Changed 15 years ago by
Attachment: | 5079.patch added |
---|
comment:2 Changed 15 years ago by
Keywords: | Review? added |
---|---|
Owner: | set to Garry Yao |
Status: | new → assigned |
Proposing of insert page-break into <body>, which matches better with it's semantics.
comment:3 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
I've never used the page break command but I agree that it seems more logical to break everything until the body. But what will happen when putting the line break in the middle of an ordered list? it could restart the counter in the next page...
Anyway, the change in pathBlockLimitElements needs to include also "ol" at least, and maybe "li". Testing with an OL gets the editor in an infinite loop, so this can be risky, what other tags need to be considered? dl, dt, dd...?
Changed 15 years ago by
Attachment: | 5079_2.patch added |
---|
comment:4 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
After some spec reading, it's more appropriate to void breaking the path block.
comment:5 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
Inserting a page break in the default sample text generates this code
<p> This is some <strong>sample text</strong>. <div style="page-break-after: always;"> <span style="display: none;"> </span></div> You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
after switching to design and source again that's changed to
<p> This is some <strong>sample text</strong>.</p> <div style="page-break-after: always;"> <span style="display: none;"> </span></div> <p> You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
comment:6 Changed 15 years ago by
Cc: | Frederico Caldeira Knabben added |
---|---|
Keywords: | Discussion added |
Ok...I'm proposing here to use the following mark when output page break, with such we could have both the line breaking visual effect and valid HTML.
<span style="page-break-after: always;display:block"> </span>
comment:7 Changed 15 years ago by
Keywords: | Review- removed |
---|
comment:8 follow-up: 10 Changed 15 years ago by
Milestone: | CKEditor 3.3 → CKEditor 3.4 |
---|
I think a nice solution would be instead changing the current thing we have there. Instead of having a block element, which renders as a line in the editor, we could have it as an inline icon, just like we have for anchors. This will give the flexibility of placing the break at any place in the contents, avoiding it breaking the contents structure in any way.
We need more time to discuss and implement this feature, so I'm postponing it a bit.
comment:9 Changed 14 years ago by
Owner: | changed from Garry Yao to Tobiasz Cudnik |
---|---|
Status: | assigned → new |
Changed 14 years ago by
Attachment: | 5079_3.patch added |
---|
comment:10 Changed 14 years ago by
Keywords: | Review? added |
---|
Replying to fredck:
I think a nice solution would be instead changing the current thing we have there. Instead of having a block element, which renders as a line in the editor, we could have it as an inline icon, just like we have for anchors. This will give the flexibility of placing the break at any place in the contents, avoiding it breaking the contents structure in any way.
Newest patch implements this ideas. For visual comfort, page break is much wider then anchor icon.
comment:11 follow-up: 14 Changed 14 years ago by
Keywords: | Review+ added; Discussion Review? removed |
---|
It seems to address the current issues. I guess that some people will claim that using an inline element this way is wrong or that the way that it's shown isn't as clear as a whole line block element, but we can't make everyone happy.
comment:14 Changed 14 years ago by
Keywords: | Confirmed Review+ removed |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Replying to alfonsoml:
It seems to address the current issues. I guess that some people will claim that using an inline element this way is wrong or that the way that it's shown isn't as clear as a whole line block element, but we can't make everyone happy.
Well, as long as they don't blame on us because it's not working on Ie, I'm ok with it :)
That's not the case though: #6077.
Changed 14 years ago by
Attachment: | 5079_4.patch added |
---|
comment:15 Changed 14 years ago by
Owner: | changed from Tobiasz Cudnik to Frederico Caldeira Knabben |
---|---|
Status: | reopened → review |
I'm proposing a less drastic solution, targeted to fix the reported issue.
comment:16 Changed 14 years ago by
Status: | review → review_passed |
---|
Very simple fix, but works very well for all cases i've tested (multiple page breaks, nested lists).
comment:17 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [5791].
In fact the page break element is inserted in between the <li> elements, not inside the current one.