yidashi/yii2-bootstrap-markdown

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v1.0.2) of this package.

yii2-boostrap-markdown

Installs: 1 567

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 1

Forks: 4

Language:JavaScript

v1.0.2 2015-12-15 10:32 UTC

This package is not auto-updated.

Last update: 2018-05-09 18:41:10 UTC


README

composer require yidashi/yii2-bootstrap-markdown:"*"

2.使用

直接使用

<?= \yidashi\markdown\Markdown::widget(['name' => 'xxx', 'language' => 'zh'])?>

或者在activeForm里使用

<?= $form->field($model,'attributeName')->widget('yidashi\markdown\Markdown',['language' => 'zh']); ?>

语言参数language默认就是zh,可以不提供

如果需要上传图片功能,加useUploadImage => true,此功能依赖 yidashi/yii2-webuploader,见https://github.com/yidashi/yii2-webuploader

3.解析

<?= yii\helpers\Markdown::process($content, 'gfm')?>