Pre-designed HTML editor

Hello all,

I have to develop a system for a client who need something like the
Campaign Monitor Online WYSIWYG Editor but on for an HTML Output. (you
can see the Campaing Monitor Editor in the attachment).

The system is made by HTML files containing some "tags". These tags
become "editable parts" of the document. When you click on a pencil,
that load a editor where you can type.

So, my question is how can I start with something like that ?? How can I
make something like that ? How can I tell Rails to transform a special
tag, let say [title default=""] to become something editable ?

Is there something existing as a plugin or something else ?