ezoterik / yii2-easymde
Easy MarkDown Editor for Yii2
Installs: 687
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.4.0
- npm-asset/easymde: ^2.13.1
- yiisoft/yii2: ~2.0.41
Suggests
- yiisoft/yii2-coding-standards: you can use this package to check for code style issues when contributing to repository
This package is auto-updated.
Last update: 2024-11-29 06:47:12 UTC
README
Widget based on Easy MarkDown Editor
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ezoterik/yii2-easymde "*"
or add
"ezoterik/yii2-easymde": "*"
to the require section of your composer.json.
Usage
Once the extension is installed, simply add widget to your page as follows:
- Usage with ActiveForm and model
<?php echo $form->field($model, 'content')->widget(\ezoterik\easymde\EasyMDE::class, [ 'editorOptions' => [ 'showIcons' => ["code", "table"], ], ]); ?>
- Usage without ActiveForm and model
<?php echo \ezoterik\easymde\EasyMDE::widget([ 'name' => 'markdown-editor', 'editorOptions' => [ 'showIcons' => ["code", "table"], ], ]); ?>
Markdown Editor Options
You can find them on the options page