danielsaidi / RichTextKit

RichTextKit is a Swift SDK that helps you use rich text in Swift and SwiftUI.
MIT License
814 stars 97 forks source link

Adopt TextKit 2 (Explicitly) #153

Open DominikBucher12 opened 4 months ago

DominikBucher12 commented 4 months ago

We should move out of using NSLayoutManager and NSTextStorage and NSTextContainer in order to adopt TextKit2.

Currently I believe there must be some other fix to lines and style setting to don't than iterating through textStorage (or we can use new NSTextLayoutManager from TextKit 2 to access this)

The issue with TextKit1 is that it doesn't support native bullet points and numbered points with NSTextList API for a very convenient way to handle those.

Let's maybe wrap the NSLayoutManager for iOS 15 and for iOS 16 use NSTextLayoutManager 🆕🆕🆕