I have a form that has both a managed_file element and a text_format element. Both are encapsulated in a wrapper div (using #prefix and #suffix). On submit, an AJAX callback is executed and both elements are populated with data.
When I remove the managed_file element, the form works as it is supposed to. It probably has something to do with the Drupal behaviours not being executed properly (managed_file widget?), not removing the editor instance.