Firedocs can be extended with add-ons. Their main realm is content type support: you add editing capabilities for a content type by writing an add-on. Firedocs ships with two built-in add-ons: html and xhtml support.
A word of warning: Firedocs is still under heavy development. The API is subject to change without notification!
First, get the source and learn how to build Firedocs. We are working on a tutorial about add-ons development. For the moment you have to explore the sources of the Xhtml Add-on for a working example.
Note that for mixed xhtml you don't have to write a special add-on unless you need custom widgets. In most cases it should be sufficent to use a custom schema and an appropriate set of content blocks.