Help with #text_format and field widgets
Good luck with that. What a head-scratching nightmare. See Missing hook_field_widget_form_submit()? for an idea of how to make this easier.

I got this to work once in a module, but then had to remove it for other reasons. The code is still there, look at this older version of flashcard.install and flashcard.module, especially flashcard_field_widget_form() and flashcard_field_formatter_view().