Live data from Hacker News

Nerdy internals of an Apple text editor

papereditor.app

71–80 of 93 posts

Re: Nerdy internals of an Apple text editor

#71
Imagine going through all that effort, and then saving the output in Markdown. It's like finishing your astrophysics PhD and then getting a lobotomy.

Just to repeat my years-long crusade of yelling at clouds, we need a cross platform, Rich Text HTML Document standard.

Re: Nerdy internals of an Apple text editor

#72

Imagine going through all that effort, and then saving the output in Markdown. It's like finishing your astrophysics PhD and then getting a lobotomy. Just to repeat my years-long crusade of yelling at clouds, we need a cross platform, Rich Text HTML Document standard .

Isn't that "just" HTML? What should be added to HTML?

Re: Nerdy internals of an Apple text editor

#73
post #3

I love articles like this.

I'd like to see a similar treatise on the Apple Document system. I love that thing, it's a favorite part of all the Apple apps.

That makes me super curious about it. I've only had some small interaction while learning SwiftUI and I was confused in passing, and sort of just smashed things until it worked.

Re: Nerdy internals of an Apple text editor

#74
The TextEdit app consists almost entirely of a single TextView

I believe WordPad is the Windows equivalent, based on the RichEdit control.

Another fun fact is that RTF is basically the serialized form of NSAttributedString.

The same is true of Windows' RichEdit control. In fact, it looks like Windows' implementation came first: https://en.wikipedia.org/wiki/Rich_Text_Format

Re: Nerdy internals of an Apple text editor

#75
casual opinion; To the App developer (Mihhail L/@_mihhail?) themselves, to say: Loved just how it keeps itself, everything-from-the emoji of engineering, engi-peeping, mechanical heading–towards focus on screen/container mixed with data storage.

Never certain how it keeps for scrolling; the issue lies in drag, doomscrolls, scrollbar versus tap-for-scrolling… now, on topic of moving on: “a good OS citizen, you should provide many formats”, not keen on everything/too-many Media Formats keeping it sweet, simple; some of these Apps can become almost utility goto. Some of my favourites, include emoji meets paste formatting issues in export. How do they render correctly the almost, "interstitial flickering" change.

My expectations paused at Themes/Theming (not really happening? different looks) no simple mention of light Vs. dark; willow filter adjustment tones? Okay! Still, amazement. I believe, we choose our (kind of) Paper whenever possible.

…Thanks!

All the kindest of regards, from reading nerdy happenings! Kai V (@kaichanvong)

Re: Nerdy internals of an Apple text editor

#76

casual opinion; To the App developer (Mihhail L/@_mihhail?) themselves, to say: Loved just how it keeps itself, everything-from-the emoji of engineering, engi-peeping, mechanical heading–towards focus on screen/container mixed with data storage. Never certain how it keeps for scrolling; the issue lies in drag, doomscrolls, scrollbar versus tap-for-scrolling… now, on topic of moving on: “a good OS citizen, you should…

[deleted]

Re: Nerdy internals of an Apple text editor

#77
For me, as a long-time Android app developer, it was interesting to see how Apple approaches things somewhat differently and more thoughtfully.

On Android, you basically have the Layout class (and its subclasses) that does everything related to both layout and rendering, and TextView which implements some of the editing/selection logic. The only difference between EditText and TextView is that EditText enables that editing functionality already present in TextView. The problem with this rather monolithic approach (and poor APIs) is that if you need more control over how your app renders text, you're out of luck. Want to get at the individual glyphs after they've been laid out for example? Nope, sorry.

Re: Nerdy internals of an Apple text editor

#78

What a great article (and personally timely, wrangling NSTextViews at the moment). How did you glean the information needed to write this? Other people’s code? Painful experience? developer.apple.com?

Thanks!

I've been working on Paper for 9 years. I've had a lot of time to study how everything works. :D

Re: Nerdy internals of an Apple text editor

#79

The TextEdit app consists almost entirely of a single TextView I believe WordPad is the Windows equivalent, based on the RichEdit control. Another fun fact is that RTF is basically the serialized form of NSAttributedString. The same is true of Windows' RichEdit control. In fact, it looks like Windows' implementation came first: https://en.wikipedia.org/wiki/Rich_Text_Format

Interesting facts!
Post reply on HN