lubobill1990 / yii2-simditor
为 yii2 框架的编辑器
v0.0.6
2018-04-18 09:11 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: ~2.0.10
README
安装此扩展的首选方式是通过 composer。
运行以下命令之一
$ php composer.phar require lubobill1990/yii2-simditor "*"
或者在您的 composer.json
文件的 require 部分添加
"lubobill1990/yii2-simditor": "*"
to
使用方法
像小部件一样
echo \lubobill1990\yii2\widget\Simditor::widget([ 'clientOptions'=>[ 'toolbarHidden' => false, 'toolbar' => [//default true 'title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale' ] ] ]);
像 ActiveForm 小部件一样
use lubobill1990\yii2\widget\Simditor; echo $form->field($model, 'content')->widget(Simditor::class,[ 'clientOptions'=>[ 'toolbarHidden'=>false, 'toolbar'=>[//default true 'title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale' ] ] ]);
有关其他选项,请参阅此网站 http://simditor.tower.im/
声明
此包是从 anxu/yii2-simditor 分支出来的