xutl/yii2-ace-widget
Composer 安装命令:
composer require xutl/yii2-ace-widget
包简介
The ace extension for the Yii framework
README 文档
README
该插件非免费插件也不授权任何人使用。
安装
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist xutl/yii2-ace-widget
or add
"xutl/yii2-ace-widget": "~1.0"
to the require section of your composer.json.
使用
一但安装了该扩展,可以使用下面的代码调用编辑器 :
<?= \xutl\ace\AceEdit::widget( [ 'mode'=>'html', 'theme'=>'github', 'containerOptions'=>[ 'style'=>'width: 100%; min-height: 400px', ] ] ); ?>
在表单中使用
<?= \xutl\ace\AceEditInput::widget( [ 'model'=>$model, 'attribute'=>$attribute, 'mode'=>'html', 'theme'=>'github', 'containerOptions'=>[ 'style'=>'width: 100%; min-height: 400px', ] ] ); ?> <?= $form->field($model, 'content')->widget(\xutl\ace\AceEditInput::className(), [ 'mode' => 'text', 'theme' => 'chrome' ]); ?>
统计信息
- 总下载量: 73
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-09-03