I'm working with media 7.x-2.0-unstable7.
I am attempting to adjust the behavior of the media module's wysiwyg embedded image attribute editor modal dialog (c.f. http://drupal.org/node/835516). It was pretty easy to adjust the contents of this dialog with hook_media_format_form_prepare_alter (see: http://drupal.org/node/835516#comment-7075374), and I expected that it would be easy to add a submit handler, and Drupal would jump through the hoops for me to insure that it was called at the right time. If this service is offered, I can't seem to figure out how to make it work.
The only other place I can find that uses hook_media_format_form_prepare_alter is media_crop, and it includes its own ajax POST to send its data back to the server. It's not clear to me how the standard media_format_form saves its data. It looks like ctools handles calling the submit handler for similar form, media_file_edit_modal (called for editing image metadata fields for media image files that are entity fields). Is there something similar for hook_media_format_form_prepare_alter, or do I have to write my own Javascript and my own data-receive menu, like media_crop does?
media.api.php did not help clarify.