I use the widget to perform any kind of text operation. And this operation must be performed in beforeSave (). Well, or come up with something else. This is a widget.
<?php require_once('/../EMT.php'); class lnEMTypograph extends CWidget { public $text; public function init() { parent::init(); } public function run() { $typograph = new EMTypograph(); $typograph->setup([ 'Text.paragraphs' => 'off', 'OptAlign.oa_quote' => 'off', ]); $typograph->set_text($text); $text = $typograph->apply(); echo $text; $this->render($text); } }