altiore / yii2-markdown
Yii2 markdown parser and editor
Installs: 122
Dependents: 3
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 1
Type:yii2-extension
Requires
- bower-asset/simplemde: 1.11.*
- erusev/parsedown: 1.6.*
- yiisoft/yii2: 2.0.*
This package is not auto-updated.
Last update: 2024-12-25 20:34:17 UTC
README
Yii2 markdown parser and editor
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist altiore/yii2-markdown "*"
or add
"altiore/yii2-markdown": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
- Convert markdown to html:
<?= \altiore\yii2\markdown\Markdown::convert($markdownText); ?>
- Editor markdown in yii2 form:
<?= $form->field($model, 'text')->widget(\altiore\yii2\markdown\MarkdownEditor::class) ?>