3ch3r46 /
yii 框架的 TinyMCE 扩展
1.0.0
2014-05-28 15:40 UTC
This package is auto-updated.
Last update: 2024-09-09 13:11:38 UTC
README
yii 框架的 TinyMCE 扩展
安装
安装此扩展的首选方式是通过 Composer。
运行以下命令之一:
php composer.phar require --prefer-dist 3ch3r46/yii2-tinymce "1.0.0"
或者在您的 composer.json
文件的 require 部分添加以下内容:
"3ch3r46/yii2-tinymce": "1.0.0"
to the require section of your composer.json
file.
使用方法
扩展安装完成后,您只需在代码中通过以下方式使用它:
[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,
]
]);