PHP code example of craftcms / redactor
1. Go to this page and download the library: Download craftcms/redactor 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/ */
craftcms / redactor example snippets
use craft\htmlfield\events\ModifyPurifierConfigEvent;
use craft\redactor\Field;
use HTMLPurifier_Config;
use yii\base\Event;
Event::on(
Field::class,
Field::EVENT_MODIFY_PURIFIER_CONFIG,
function(ModifyPurifierConfigEvent $event) {
/** @var HTMLPurifier_Config $config */
$config = $event->config;
// ...
}
);