Remove Empty Tags In Imperavi Redactor
Using Imperavi Redactor with Yii 2 framework. When no text is entered, Imperavi Redactor produces this markup: . For each line break this markup is app
Solution 1:
Found this solution:
useyii\helpers\HtmlPurifier;
$text = HtmlPurifier::process($model->text, [
'HTML.ForbiddenElements' => ['p', 'br', ' '],
]);
Post a Comment for "Remove Empty Tags In Imperavi Redactor"