Go and see WYSIWYG Pro (http://www.wysiwygpro.com/demos/demo1.php) which
does some of the things you are after. It's pure JS, IIRC. Not free
Yes the resizing of the elements shows something like what I want to
accomplish. And it works great in Mozilla. I looked through the source
code of the html editor, but it was not apparent to me where the actual
code that does that fancy resize thing. It will be difficult to get an
idea of how they do that.