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

1.0.2 2016-06-27 08:32 UTC

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 :

  1. Convert markdown to html:
<?= \altiore\yii2\markdown\Markdown::convert($markdownText); ?>
  1. Editor markdown in yii2 form:
<?= $form->field($model, 'text')->widget(\altiore\yii2\markdown\MarkdownEditor::class) ?>