text_format field value not appearing in full_html mode I'm using a block plugin to display content based on what the user inputs into a form. Select boxes, and radio buttons are saved and displayed in the form just fine but the text_format field isn't working the same way.

public function blockForm($form, FormStateInterface $form_state){

    $form['bodytext'] = array(
      '#type' =&gt; 'text_format',
      '#title' =&gt; $this-&gt;t('Block contents'),
      '#format' =&gt; 'full_html',
      '#description' =&gt; $this-&gt;t('This text will appear in the block.'),
      '#default_value' =&gt; $this-&gt;configuration['bodytext-submit'],
    );
}

public function blockSubmit($form, FormStateInterface $form_state) {

    $this-&gt;configuration['bodytext-submit']  = $form_state-&gt;getValue('bodytext');
}
public function build(){

    return array(
        '#title' =&gt; '',
        '#type' =&gt; 'markup',
        '#markup' =&gt; '&lt;div&gt;' . $this-&gt;configuration['bodytext-submit']['value'] . '&lt;/div&gt;',
    );
}


Anything input into the text_format element in the form is saved properly but when returning to the form, the field is empty unless the format is set to 'basic_html'.
So I know the values are being saved, and are even presently available in the configuration form of the block. It simply isn't displayed in 'Full_html' mode.
You don't need to eliminate the #format. 

The format and value of the text_format are stored as an array. So in the same way as you retrieve the value you can retrieve the format.

See this example:

public function blockForm($form, FormStateInterface $form_state) {

  $body = !empty($this-&gt;configuration['body']) ? $this-&gt;configuration['body'] : '';
  $form['body'] = array(
    '#type' =&gt; 'text_format',
    '#title' =&gt; 'Body',
    '#format' =&gt; isset($body['format']) ? $body['format'] : 'full_html',
    '#default_value' =&gt; isset($body['value']) ? $body['value'] : '',
  );
  return $form;
}

public function blockSubmit($form, FormStateInterface $form_state) {
  $this-&gt;configuration['body'] = $form_state-&gt;getValue('body');
}