PHP code example of suncky / yii-ueditor

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

    

suncky / yii-ueditor example snippets


return [
    'components' => [
        'assetManager' => [
            'assetMap' => [
                'ueditor.config.js' => '@web/js/ueditor.config.js', // 具体的存放路径参照项目定义
            ],
        ],
    ],
];

$form = ActiveForm::begin();
echo $form->field($model, 'content')->widget(['class' => UEditor::className(), 'ueditorAction' => '后端请求,包括上传等']);
$form->end();