This article is from the Mac Programming FAQ, by Jon Watte firstname.lastname@example.org with numerous contributions by others.
You don't. Truly, it's not worth it. There's a call-for-call
TextEdit replacement called TE32k which does > 32k text, and is
available from any recent Info-Mac mirror. It doesn't do styled text,