09/01
2015
The TinyMCE Extension for yii framework
The TinyMCE Extension for yii framework, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist 3ch3r46/yii2-tinymce "1.0.0"
or add, (*4)
"3ch3r46/yii2-tinymce": "1.0.0"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply use it in your code by :, (*6)
[php] use a3ch3r46\tinymce\TinyMCE; echo TinyMCE::widget(['name' => 'text-content']); $form->field($model, 'attribute')->widget(TinyMCE::className()); //toggle to tinyMCE or to textarea echo TinyMCE::widget(['name' => 'text-content', 'toggle' => ['active' => true]]); $form->field($model, 'attribute')->widget(TinyMCE::className(), [ 'toggle' => [ 'active' => true, ] ]);