PHP code example of nedarta / yii2-clean-html-behavior
1. Go to this page and download the library: Download nedarta/yii2-clean-html-behavior library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nedarta / yii2-clean-html-behavior example snippets
use nedarta\behaviors\CleanHtmlBehavior;
public function behaviors()
{
return [
[
'class' => CleanHtmlBehavior::class,
'attributes' => ['content', 'description'],
'htmlPurifierConfig' => [
'HTML.Allowed' => 'p,b,i,u,ul,ol,li',
],
'keepEmoji' => true, // Set to true to preserve emoji characters
],
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.