moonlandsoft / yii2-tinymce
yii框架的TinyMCE扩展
1.0.0
2015-01-24 04:45 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-24 02:54:28 UTC
README
yii框架的TinyMCE扩展
安装
安装此扩展的首选方法是通过composer。
运行以下命令之一
php composer.phar require --prefer-dist moonlandsoft/yii2-tinymce "*"
或将以下内容添加到您的composer.json
文件的require部分。
"moonlandsoft/yii2-tinymce": "*"
使用方法
扩展安装完成后,只需在您的代码中使用即可
use moonland\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, ] ]);