I don't think I can generate the entries for a TOC automatically, I don't have enough info to know where to put the links. But once I rough out the editing commands you should be able to drop in h1 headings and use that to generate TOC entries pretty easily.
Turns out FF 3.0 broke the command interface for the rich editor, I just found a workaround. So I'll add the basic commands and try to get a release out this weekend and then add more as time permits.
I tried using
TinyMCE as the embedded editor as it sits on top of the same element, but it doesn't appear to work well inside of a plugin.