TextKit 2 – The Promised Land
blog.krzyzanowskim.com
TextKit 2 – The Promised Land
1–10 of 33 posts
Re: TextKit 2 – The Promised Land
#2This is the key insight that makes TextKit2 workable. I personally would not attempt to build an alternative to UITextView on TextKit (1 or 2). Instead, TextKit2 is all about very sensible intervention points for customizing UITextView (eg, Markdown-style parsing, typography, interactions, layout).
I recently rebuilt Minimal’s editor with TextKit2 (see minimal.app/#beta to experience it), and found Kryzanowskim’s deep dives very fruitful. He explores the edges of the API, so his writing helped me identify a nice bounds of safe-space to work in, and helped clarify what areas are too complex to safely build custom functionality within. (So thank you, author!)
I would not dismiss TextKit2; it is an incredible improvement over TextKit1. It remains a complicated and challenging field.
Re: TextKit 2 – The Promised Land
#3I have to wonder if the scrollbar problem is inescapable, given the shape of the problem.
Flutter has dealt with similar issues, perhaps by virtue of more eyeballs / being slightly older, there are solutions. SuperSliverList in particular completely erased the jumpy-jank that happened when estimates changed to concrete values.
Re: TextKit 2 – The Promised Land
#4> TextKit2 is implemented to be used by UITextView This is the key insight that makes TextKit2 workable. I personally would not attempt to build an alternative to UITextView on TextKit (1 or 2). Instead, TextKit2 is all about very sensible intervention points for customizing UITextView (eg, Markdown-style parsing, typography, interactions, layout). I recently rebuilt Minimal’s editor with TextKit2 (see minimal.app/#b…
It's an absolute disaster on macOS. Even TextEdit app is now buggy as hell.
It's incredible how Apple broke plain text display on the Mac, which was a solved problem since forever.
Re: TextKit 2 – The Promised Land
#5> TextKit2 is implemented to be used by UITextView This is the key insight that makes TextKit2 workable. I personally would not attempt to build an alternative to UITextView on TextKit (1 or 2). Instead, TextKit2 is all about very sensible intervention points for customizing UITextView (eg, Markdown-style parsing, typography, interactions, layout). I recently rebuilt Minimal’s editor with TextKit2 (see minimal.app/#b…
sure. If only UITextView/NSTextView did not have bugs impossible to workaround otherwise. TextKit 2 support in UITextView/NSTextView was really bad. improved over time. and still remain buggy. The UITextView focus limits the use of TextKit 2 architecture significantly.
Re: TextKit 2 – The Promised Land
#6Re: TextKit 2 – The Promised Land
#7Interesting read. I have to wonder if the scrollbar problem is inescapable, given the shape of the problem. Flutter has dealt with similar issues, perhaps by virtue of more eyeballs / being slightly older, there are solutions. SuperSliverList in particular completely erased the jumpy-jank that happened when estimates changed to concrete values.
Re: TextKit 2 – The Promised Land
#8Re: TextKit 2 – The Promised Land
#9https://github.com/SuperSwiftMarkup/SuperSwiftMarkdownProtot...
It’s a good example of what else you can do with TextKit2, beyond plain text rendering. Here, I can draw text layout fragments in a core graphics context and use typographic information to also render markdown specific graphics in the background or foreground such as markdown tables. One day I’d love to experiment with a markdown centric spread sheet app.
At the time there was so little online info that I had to figure out everything on my own (and no chatbots didn’t have a clue about TextKit2), but STTextView was a great reference. Overall his open source work was very much appreciated. (I should probably say as much in the read me.)
That experiment was also a ton of work that ultimately didn’t go anywhere. Most people would rather just use a relatively subpar embedded browser (i.e. web view).
Re: TextKit 2 – The Promised Land
#10Oh hey good to see some more literature on TextKit2. I remember diving into it when I wrote my proof of concept markdown renderer: https://github.com/SuperSwiftMarkup/SuperSwiftMarkdownProtot... It’s a good example of what else you can do with TextKit2, beyond plain text rendering. Here, I can draw text layout fragments in a core graphics context and use typographic information to also render markdown specific graphi…