- Issue created by @Shane Birley
- 🇨🇦Canada Shane Birley
In my mind, when a page break is applied, it should (basically) clear everything away on both left and right, much like in a word processor. I checked the CSS that is applied to the .page-break class and I don't feel it covers all scenarios when alignment is in play. For paragraphs, lists, and the like - it works fine.
Anyway, after playing around with using CSS as the solution rather than messing with the module code, here is what I have come up with.
1. First apply a clear to classes and floats used within CKeditor that have .page-break assigned whether or not is is a float, inline, etc.
.align-left ~ .page-break, .align-right ~ .page-break, [class*="align-"] ~ .page-break, [style*="float:left"] ~ .page-break, [style*="float:right"] ~ .page-break { clear: both !important ; display: block !important ; margin-top: 0 !important ; margin-bottom: 0 !important ; padding: 0 !important ; }
2. But also make sure to be faithful to making sure the .page-break class function works but doesn't add any padding or spacing to itself.
.page-break { display: block !important ; clear: both !important ; margin: 0 !important ; padding: 0 !important ; }
I am using "!important" here just to override the current configuration but I don't think it would be necessary for a modification to the module.
I wonder if I am missing something within the config... but I don't think so. Thoughts? Questions?
Hi Shane
According to CKE5 documentation, page break focuses on formatting content for printing or exporting to Word/PDF.
If you'd like to use it to format your rendered content, the best way is to apply custom CSS on your site.