powerkernel / yii2-tinymce
TinyMCE widget for Yii2.
Installs: 1 334
Dependents: 4
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 48
Language:JavaScript
Type:yii2-extension
Requires
- tinymce/tinymce: >=4
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-11-18 03:12:13 UTC
README
forked from 2amigos/yii2-tinymce-widget
Installation
The preferred way to install this extension is through composer.
Either run
composer require powerkernel/yii2-tinymce "*"
or add
"powerkernel/yii2-tinymce": "*"
to the require section of your application's composer.json
file.
Usage
use powerkernel\tinymce\TinyMce;
<?= $form->field($model, 'text')->widget(TinyMce::class, []);?>
Custom Options
<?= $form->field($model, 'text')->widget(TinyMce::class, [
'options' => ['rows' => 6],
'clientOptions' => [
'height'=>320,
'menubar'=> true,
'plugins' => [
"advlist autolink lists link charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste image"
],
'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | removeformat code"
]
]);?>