PHP code example of jodit / yii2-jodit

1. Go to this page and download the library: Download jodit/yii2-jodit 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/ */

    

jodit / yii2-jodit example snippets


'modules' => [
	'jodit' => 'yii2jodit\JoditModule',
],

'modules' => [
	'jodit' => [
		'class' => 'yii2jodit\JoditModule',
		'extensions'=>['jpg','png','gif'],
		'root'=> '@webroot/uploads/',
		'baseurl'=> '@web/uploads/',
		'maxFileSize'=> '20mb',
		'defaultPermission'=> 0775,
	],
],

<?=$form->field($model, 'content')->widget(\yii2jodit\JoditWidget::className(), [
    'settings' => [
        'buttons'=>[
            'bold', 'italic', 'underline', '|', 'ul', 'ol', '|', 'image', '|', 'hr',
        ],
    ],
]);

<?= \yii2jodit\JoditWidget::widget([
    'model' => $model,
    'attribute' => 'content'
]) 

<?=$form->field($model, 'content')->widget(\yii2jodit\JoditWidget::className(), [
    'settings' => [
        'height'=>'250px',
        'enableDragAndDropFileToEditor'=>new \yii\web\JsExpression("true"),
    ],
]);

<?=$form->field($model, 'icon')->widget(\yii2jodit\JoditIconPickerWidget::className(), [
	"path" => 'wp-content/plugins/exchangers-monitor/images/systemlogo'
]);

php composer.phar