>I expect that Apple's TextEdit.app is just a wrapper around the rich text control in Cocoa
https://developer.apple.com/library/archive/samplecode/TextE...