sandritsch91 / yii2-froala-editor
Yii2 Froala Editor widget extended from froala/yii2-froala-editor
Installs: 243
Dependents: 0
Suggesters: 1
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Language:JavaScript
Type:yii2-extension
Requires
- php: >=8.2
- froala/yii2-froala-editor: ^4.2.1
- yiisoft/yii2: ^2.0.42
Requires (Dev)
- yiisoft/yii2-bootstrap5: ^2.0.4
README
Extension for froala/yii2-froala-editor
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist sandritsch91/yii2-froala-editor
or add
"sandritsch91/yii2-froala-editor": "*"
to the require section of your composer.json
Default configuration
This widget extends the original FroalaEditor Widget. This had to be done to be able to configure the FroalaEditor in the Yii2 way. I also added a few default options, you can overwrite them in the configuration of the application, or in the configuration of the widget.
Product key
You can set the product key in the (local) configuration of the application:
'container' => [ 'definitions' => [ 'sandritsch91\yii2\froala\FroalaEditor' => [ 'defaultClientOptions' => [ 'key' => 'YOUR_PRODUCT_KEY', ] ] ] ]
Plugins
The original FroalaEditor adds the plugins dynamically, which makes it impossible to configure them in the Yii2 way. They are all loaded by default, but you can disable them in the configuration of the widget:
<?= FroalaEditor::widget([ 'clientPlugins' => [ ... ], 'excludedPlugins' => [ ... ], ]); ?>