Once again. I am once again totally amazed by the power of XBL. I have a working implementation of templates in Nvu in front of me. It's not perfect yet and I still have to do some tuning and add a few necessary extensions. But it's so simple with XBL. And I think the result is quite nice.

Comments
You should add some padding to the editable part of the template
Ah, I just discovered XBL and chrome won't be enough. I need to hack mozilla/editor/libeditor a bit.