pravda1979 / yii2-tinymce
TinyMCE WYSIWYG HTML Editor for Yii2.
Package info
gitflic.ru/project/pravda/yii2-tinymce.git
Language:JavaScript
Type:yii2-extension
pkg:composer/pravda1979/yii2-tinymce
1.1.0
2019-03-22 00:57 UTC
Requires
- php: >=5.4
- tinymce/tinymce: ^5
- yiisoft/yii2: ~2.0.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Extension for Yii2 based on TinyMCE 5.
Installation
Preferred installation method for this extension is through composer.
To install TinyMCE extension run:
composer require pravda1979/yii2-tinymce "~1.0.0"
or add to the require section of your application's composer.json file.
"pravda1979/yii2-tinymce": "~1.0.0"
Demo
You can see demo example
Usage
Use with model
use pravda1979\tinymce\TinyMce;
<?= $form->field($model, 'html')->widget(TinyMce::className(), [
'options' => ['rows' => 10],
'language' => 'ru',
'clientOptions' => [
// Setting by default
'plugins' => 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern help',
'toolbar' => 'formatselect | bold italic strikethrough forecolor backcolor formatpainter | link image media | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | addcomment',
]
]);?>
or without model
use pravda1979\tinymce\TinyMce;
<?= \pravda1979\tinymce\TinyMCE::widget([
'name' => 'test-tinymce',
'value' => 'test TinyMCE',
'language' => 'ru',
'clientOptions' => [
// Setting by default
'plugins' => 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern help',
'toolbar' => 'formatselect | bold italic strikethrough forecolor backcolor formatpainter | link image media | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | addcomment',
]
]); ?>