Configure
Add to config file (config/web.php or common\config\main.php)
'modules' => [
'redactor' => 'yii\redactor\RedactorModule',
],
php composer.phar require --prefer-dist yiidoc/yii2-redactor "*"
ejemplo:
<?php $form->field($model, 'resumen_reporte')->widget(\yii\redactor\widgets\Redactor::className(), [
'clientOptions' => [
'imageManagerJson' => ['/redactor/upload/image-json'],
'imageUpload' => ['/redactor/upload/image'],
'fileUpload' => ['/redactor/upload/file'],
'lang' => 'zh_cn',
'plugins' => ['clips', 'fontcolor','imagemanager']
]
]); ?>
php composer.phar require --prefer-dist 2amigos/yii2-ckeditor-widget": "*"
ejemplo ckeditor-widget:
<?php $form->field($model, 'resumen_reporte')->widget(CKEditor::className(), [
'options' => ['rows' => 6],
'preset' => 'basic'
]); ?>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter