1.) Declare object in etlc/di.xml
2.) In Display.php
protected $templateProcessor;
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Zend_Filter_Interface $templateProcessor,
array $data = []
) {
parent::__construct($context, $data);
$this->templateProcessor = $templateProcessor;
}
public function filterOutputHtml($string)
{
return $this->templateProcessor->filter($string);
}
3.) In phtml file
$string = your editor data; Echo $block->filterOutputHtml($string); ?>