Page-based layouts with TextKit 2?

In the "old" TextKit, page-based layout is accomplished by providing an array of NSTextContainers to NSLayoutManager, each with its own NSTextView.

TextKit 2, NSTextLayoutManager allows only a single text container. Additionally, NSTextParagraph seems to be the only concrete NSTextElement class. Paragraphs often need to break across page boundaries.

How would one implement page-based layout in TextKit 2?

Hi there,

This functionality is not available in macOS Monterey Beta 1. We understand that this is an important issue for many developers and we are actively investigating the issue. If you'd like, you can file a Feedback Assistant to stay updated on the status of the issue.

Thanks for your patience!

Hi, Do you know when this functionality will appear?

Wonder, how did they provide pagination with Text Kit 2 in TextEdit app? As they said in the What's new in AppKit session, TextEdit uses Text Kit 2 since macOS Big Sur.

I'm looking for this too. It seems like a glaring oversight. Feedback submitted.

Page-based layouts with TextKit 2?
 
 
Q