Comments (5)
As a reference, the final goal is to have a page break like below. If I was able to determine dinamically which elements will have a page break, I could customize its rendering through CSS, by:
- rendering the gray rectangle over the white sheet div
- calculate its margins based on the current page content size, to fill the unused space with a blank space
So it should be a matter of the element rendering, without affect the model or other internals.
from ckeditor5.
Thanks for the suggestions, we will keep this open for sure. This topic requires significant research on our side, our initial thoughts, if I remember right, were that such page breaks would be quite challenging to achieve with our current data model.
from ckeditor5.
@edersoncassioleverpro With medium to large documents, or styling-heavy documents, pagination causes significant performance issues and there are a number of bugs with how it works with tables and imported DocX content.
Have you experience similar performance issues with pagination? in many cases, with a larger document, its essentially unusable.
from ckeditor5.
I worked on an in-house solution. It persists the pagination results associating page numbers to block element indexes, so the pagination alwas can start from the current page being edited. It certainly makes the page breaking fast when typing at the end of the document.
Also, the process is triggered from the user keystrokes (actually change:data
events) in a debounced way, waiting for for an amount of time after him or her stops the typing. This avoids performance issues while user is typing at the beginning of a document, although it will require the process to finish before performing operations on the whole document, such as persistence.
Editions made while the pagination is ongoing should interrupt it and reschedule it in the debounced way I mentioned above.
Maybe you could use the same approach for a reasonably result as I have had here.
from ckeditor5.
Also, tables should be broken if don't fit into the available space of its starting page. The process I made keeps the lines that fit in the current page and keep the remaining for continuing the process in the next page, possibly making new breaks.
I have some issues with .docx also. There is a bunch of <div>
that should be treated recursively, by extracting the paragraphs, headings and others from inside them.
from ckeditor5.
Related Issues (20)
- How to control the execution order of inputTransformation event listeners?
- Set default link for Link Dialog HOT 1
- Math type not working language.toLowerCase is not a function
- Show table header row during scroll with long tables
- Support for multi-line editor placeholder
- Comments can be duplicated when combining undo and pasting same comment twice
- Remove Image-Tag before pasting
- Keyboard shortcut reference is outdated HOT 1
- In restricted-editing field "insertImage" command should insert inline image not block image
- TypeScript error in @ckeditor/ckeditor5-basic-styles/src/attributecommand.d.ts HOT 6
- CKEditor5 replaces single quotation mark `'` with the useless/invalid (X)HTML `'` entity, breaking src paths in legacy images HOT 4
- 'Unknown word' in every CSS file during the build process.
- Export VirtualTestEditor so it can be used by external projects HOT 2
- Editor initialization failed. Cannot read properties of null (reading 'getAttribute') HOT 2
- SyntaxError: Invalid or unexpected token 50.toString() HOT 6
- Docs issue report from "framework/deep-dive/upload-adapter.html" HOT 1
- Export a few more types/classes from the mention package HOT 2
- Headless editor still requires css/svg loaders HOT 5
- 1 of 3 editors on page will not load previously saved data HOT 4
- Add help text to make toolbar/help keyboard shortcut more discoverable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckeditor5.