This article is from the Mac Programming FAQ, by Jon Watte firstname.lastname@example.org with numerous contributions by others.
There are at least three solutions.
1) The Galaxy application framework comes with a styled text editting
engine which does more than 32k of text. It also happens to support
cross-platform application development. Pricing starts at $10000.
2) DataPak is selling a cross-platform library called "PAIGE". It is
written to be customizable to any extent, and you can do _anything_ in
it (want quicktime movies that play and flow with the text while
editting? Three pages of code; you can adapt their picture sample code.)
Available for Mac, Windows & Never Trusted and Power Mac. Pricing at
$5000 ($25000 for source code) - it might be cheaper if you talk to
them. Customer support is reputed to be "lousy".
3) Or you could use WASTE 1.1 with it's embedded objects implementation
(want quicktime movies that play and flow with the text while editing?
One page of code, if that much.)