Nerdy internals of an Apple text editor
41–50 of 93 posts
Re: Nerdy internals of an Apple text editor
#42[flagged]
Re: Nerdy internals of an Apple text editor
#43I'm a little confused at the part about decorative attributes being done outside of the editing transaction, saying "And they are not even aware of the transaction since they live in the NSLayoutManager itself, not in NSTextStorage". Decorative attributes like color do normally live in the NSTextStorage! Is the author implying that the colors applied to markdown characters are being done with NSLayoutManager's tempor…
The benefit of using temporary attributes is that changing them is very fast compared to invoking the full transaction on NSTextStorage. For example, switching between Light/Dark modes is very fast in Paper.
Re: Nerdy internals of an Apple text editor
#44This is great, I think it supplants https://www.objc.io/issues/5-ios7/getting-to-know-textkit/ as my go to introduction to TextKit.
Re: Nerdy internals of an Apple text editor
#45As someone who has attempted to write their own text editor completely from scratch before, this would've been a tremendous resource to have.
Re: Nerdy internals of an Apple text editor
#46Is openGl used here at all for rendering?
Re: Nerdy internals of an Apple text editor
#47The author did a great job using images to convey the various concerns each piece of code in the API is responsible for. Also super great detail in the writing. Nice work! This feels like a technical-first article that also happens to generate goodwill for the product, as opposed to a marketing-first technical article that serves up the bare minimum of insights.
Yep, it's a win-win. A good resource plus a bit of marketing for the product.
Re: Nerdy internals of an Apple text editor
#48Are the internals of other Mac-native text editors like TextMate similar to this as well?
The MarkEdit team uses WebView and have strong opinions about why.
Re: Nerdy internals of an Apple text editor
#49This is amazing content marketing. Developers are an obvious target niche for such a product. Exposing internals of the software in a way HNers enjoy sounds like a great idea, would love to see if it worked as a traction experiment.
I would not say that developers are the target niche. The best customers are professional writers who use a ton of writing apps for different occasions.
Re: Nerdy internals of an Apple text editor
#50The UI of this doc is absolutely beautiful