Custom block build function to display wysiwyg body text
Assuming you store the block configuration via a text_format form element as in https://drupal.stackexchange.com/a/278811/47547
src/Plugin/Block/ExampleBlock.php
&lt;?php

namespace Drupal\mymodule\Plugin\Block;

use Drupal\Core\Block\BlockBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Provides an example block.
 *
 * @Block(
 *   id = &quot;mymodule_example&quot;,
 *   admin_label = @Translation(&quot;Example&quot;),
 *   category = @Translation(&quot;mymodule&quot;)
 * )
 */
class ExampleBlock extends BlockBase {

  public function blockForm($form, FormStateInterface $form_state) {
    $body = !empty($this-&gt;configuration['body']) ? $this-&gt;configuration['body'] : [];
    $form['body'] = [
      '#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');
  }

You would output the wysiwyg content via processed_text:
  public function build() {
    $build = [
      '#type' =&gt; 'container',
      'label' =&gt; ['#markup' =&gt; 'Body: '],
    ];
    if (!empty($this-&gt;configuration['body'])) {
      $build['body'] = [
        '#type' =&gt; 'processed_text',
        '#text' =&gt; $this-&gt;configuration['body']['value'],
        '#format' =&gt; $this-&gt;configuration['body']['format'],
      ];
    }
    return $build;
  }

}