How can I get the RichEditableText control to display the text in pages. Just like in Microsoft Word, it should have visual pagebreaks which are determined by a page-size setting so that, I can switch to A4, US Letter size, etc and the text will flow into vertical rectangles (pages) accordingly.

I sense I should use the Text Layout Framework, TextFlow actually.
But what is the starting point and what should I focus on, in order to get this paper layout.
Any help is appreciated.
You can’t do it with the default
RichEditableTextcomponent, but here’s a little snippet that should get you started:Replace the sizes with your A4 or other sizes. If you want the number of pages to be dynamic, you’ll have to use a
DataGroupinstead.Now we create one
TextFlowobject, we assign it one ContainerController per page, and we have it lay out the text over our pages: