https://github.com/xutl/yii2-summernote-widget
https://github.com/xutl/yii2-summernote-widget
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/xutl/yii2-summernote-widget
- Owner: xutl
- Created: 2016-10-24T08:33:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-18T09:04:49.000Z (over 7 years ago)
- Last Synced: 2025-04-18T02:22:31.306Z (about 1 month ago)
- Language: JavaScript
- Size: 211 KB
- Stars: 2
- Watchers: 0
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yii2-summernote-widget
适用于YII2的一个富文本编辑器
Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
composer require --prefer-dist xutl/yii2-summernote-widget
```or add
```json
"xutl/yii2-summernote-widget": "~1.0.0"
```to the `require` section of your composer.json.
使用
----```php
[
'class' => SummerNoteAction::className(),
'onComplete' => function ($filename, $params) {
// Do something with file
//返回图像的Url地址
}
],
];
}
}
````
widget:```php
use xutl\summernote\SummerNote;= $form->field($model, 'description')->widget(SummerNote::className(), [
'uploadUrl'=>'/file/sn-upload'
]);?>
````