This weekend I downloaded NVU which is HTML editor based on Gecko engine.I played with a bit and quickly figure out that it exhibits the same problem as editor based on MSHTML: lack of preservation of user formatting and lack of XHTML compliance. Which confirms my statement that it is difficult to build HTML editor based on a browser engine without extensive additional measures since browsers don't care about user code formatting.
Typically default editing mode of the browser engine mainly targets e-mail client which does not need to be XHTML-compliant and neither it needs to preserve user HTML formatting since e-mail authors typically never want to edit the markup. For that very reason browser-based editors don't have natural meansof editing external stylesheets since HTML e-mail should not contain them. In fact, even inline styles may not be rendered correctly so it is safer to output HTML 4.0 with formatting tags as opposed to XHTML with external stylesheets.