Oh yes, it worked fine!
it did recognize the correct format, except for one case, where I started an HTML file with <p>. (Calibre always wraps the HTML code with a <div> tag). Adding a <h1> tag at the beginning, your program recognized the file format correctly as HTML.
How about the UI? I think it would be ideal if your special field it is just another type of database column, so that people could create this multi-format field similar to any other column and use it as they are accustomed: Hovering with the mouse over the field will show (parts of) the content and a double click will it open for editing.
Would that be feasible?