https://github.com/yii2-extensions/summernote
Super simple WYSIWYG editor on Bootstrap.
https://github.com/yii2-extensions/summernote
summernote widget yii2 yii2-extensions
Last synced: about 1 month ago
JSON representation
Super simple WYSIWYG editor on Bootstrap.
- Host: GitHub
- URL: https://github.com/yii2-extensions/summernote
- Owner: yii2-extensions
- License: mit
- Created: 2023-10-28T14:09:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-15T21:31:52.000Z (over 1 year ago)
- Last Synced: 2025-02-16T09:41:44.823Z (3 months ago)
- Topics: summernote, widget, yii2, yii2-extensions
- Language: JavaScript
- Homepage:
- Size: 680 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Summernote - Super Simple WYSIWYG editor.
## Installation
The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
Either run
```
composer require --dev --prefer-dist yii2-extensions/summernote
```or add
```
"yii2-extensions/summernote": "dev-main"
```to the require-dev section of your `composer.json` file.
## Usage
### Name
```php
use Yii2\Extensions\Summernote\Summernote;echo Summernote::widget(
[
'name' => 'content',
'value' => $value,
'config' => [
'focus' => true,
'height' => 200,
'maxHeight' => null,
'minHeight' => null,
'placeholder' => 'Write here...',
],
]
);
```### Active Field
```php
use Yii2\Extensions\Summernote\Summernote;echo $form
->field($model, 'content')
->widget(
Summernote::class,
[
'config' => [
'focus' => true,
'height' => 200,
'maxHeight' => null,
'minHeight' => null,
'placeholder' => 'Write here...',
],
]
);
```### Properties of the widget
| Property | Type | Description | Default |
|----------|----------|----------------------------------|---------|
| `config` | `array ` | The configuration of the widget. | `[]` |> When YII_ENV is set to `dev` or `test`, the widget will load the non-minified version of the JavaScript files,
> otherwise it will load the minified version.## Quality code
[](https://github.com/yii2-extensions/summernote/actions/workflows/static.yml)
[](https://github.com/yii2-extensions/summernote/actions/workflows/static.yml)
[](https://github.styleci.io/repos/711200053?branch=main)## Support versions Yii2
[](https://github.com/yiisoft/yii2/tree/2.0.49.3)
[](https://github.com/yiisoft/yii2/tree/2.2)## Testing
[Check the documentation testing](/docs/testing.md) to learn about testing.
## Our social networks
[](https://twitter.com/Terabytesoftw)
## License
The MIT License. Please see [License File](LICENSE.md) for more information.