Hacker News new | ask | show | jobs
by kenferry 32 days ago
I have this impression because I know the native controls are terrific at rich text, so for some reason that support isn't done in a way the author wants to use. The source code of the TextEdit app on Mac is actually published as an example project for the frameworks. Everything in there is provided by the native framework controls.

It would make sense, for example, if you wanted to allow editing of the rich text and have the markdown be directly accessible by the user. The conversion of markdown -> attributed strings -> markdown would not produce the same raw text, which is a problem if the user can directly edit or view the markdown. The user hitting cmd-B in the text view to make something bold might end up scrapping some explicit formatting they did to the raw markdown.