zxp / yii2-simditor
yii2 simditor extension
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 120
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-02-17 16:29:46 UTC
README
yii2 simditor extension
simditor 2.3.6
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist zxp/yii2-simditor:^1.0
or add
"zxp/yii2-simditor": "^1.0"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= \zxp\simditor\Simditor::widget(); ?> or <?= $form->field($model, 'content')->widget(Simditor::className(), [ 'options' => [ 'value' => 'test', ], 'pluginOptions' => [ 'toolbar' => ['title', 'bold'] ] ]);?>
Upload Setting
Add in controller
public function actions() { return [ 'upload' => [ 'class' => 'zxp\simditor\SimditorAction', 'config' => [ 'uploadDir' => '@webroot/upload/editor', 'uploadUrl' => '@web/upload/editor' ] ] ]; }