StyledEdit is just a thin wrapper around BTextView, so reading the API for that will let you know how it stores the text (in the file) and the formatting (as "text runs", which can be saved as attributes).
Unfortunately, everything being in BTextView means it is hard to extend it with anything (pictures, etc). Which is why at some point we plan to replace BTextView with a more powerful version.
Anyway, if you follow the IRC channel, you may know that KapiX is working hard on porting LibreOffice, and has shown some screenshots. Pretty early work, but it's alive!