text_format in AJAX callback not working for node edit forms

I have a select dropdown which should use AJAX to render text_format widgets for some option in the select dropdown. Currently, the user needs to select an item in the dropdown, hit save, and edit again to see the new text_format widgets. I want to use AJAX to fix this. Strangely I am able to make this work if I use the widgets textarea, checkboxes or textfield, but once I use text_format, it doesn’t render.

This is what I have in my ajax callback function. For context, I have an event registration content type, and I want to be able to edit the description of each session of an event. We have a list of events and associated sessions in a separate database.

//ajax callback function, called when user selects an event in event dropdown
function my_module_session_list($form, &$form_state) {

  // this gets the event_id that was selected in the dropdown
  $event_id = $form_state['values']['my_content_type']['und'][0]['event_id'];

  //gets session descriptions and types based on event id
  $session_types = array();
  $session_descriptions = array();
  _my_module_get_sessions($event_id, $session_types, $session_descriptions);

  // necessary so js knows which part of the form to change
  $form['session_descriptions']['#prefix'] = "<div id='sessions-list'>"; 
  $form['session_descriptions']['#suffix'] = "</div>";

  // loop through each session and create a text_format widget
  foreach($session_types as $session_type_id => $session_type_name) {
    $session_description = $session_descriptions[$session_type_id];
    $form['session_descriptions'][$session_type_id] = array(
      // if I change this to textarea, it renders. text_format doesn't render
      '#type' => 'text_format', 
      '#title' => t($session_type_name),
      '#size' => 100,
      '#default_value' => $session_description['value'],
    );
  }
  return $form['session_descriptions'];
}

Is there any reason why I can’t use text_format? It renders perfectly with textarea. I’ve searched around for possible solutions but can’t find any.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed