没有命名空间的类 yii yii\base yii\behaviors yii\caching yii\captcha yii\console yii\console\controllers yii\console\widgets yii\data yii\db yii\db\conditions yii\db\cubrid yii\db\cubrid\conditions yii\db\mssql yii\db\mssql\conditions yii\db\mysql yii\db\oci yii\db\oci\conditions yii\db\pgsql yii\db\sqlite yii\db\sqlite\conditions yii\di yii\filters yii\filters\auth yii\grid yii\helpers yii\i18n yii\log yii\mail yii\mutex yii\rbac yii\rest yii\test yii\validators yii\web yii\widgets

Class yii\helpers\Markdown

继承yii\helpers\Markdown » yii\helpers\BaseMarkdown
可用版本自2.0
源码 https://github.com/yiichina/yii2/blob/api/framework/helpers/Markdown.php

Markdown provides an ability to transform markdown into HTML.

Basic usage is the following:

$myHtml = Markdown::process($myText); // use original markdown flavor
$myHtml = Markdown::process($myText, 'gfm'); // use github flavored markdown
$myHtml = Markdown::process($myText, 'extra'); // use markdown extra

You can configure multiple flavors using the $flavors property.

For more details please refer to the Markdown library documentation.

Note: The Markdown library works with PHPDoc annotations so if you use it together with PHP opcache make sure it does not strip comments.

公共属性

隐藏继承的属性

属性类型描述被定义在
$defaultFlavor string The markdown flavor to use when none is specified explicitly. yii\helpers\BaseMarkdown
$flavors array A map of markdown flavor names to corresponding parser class configurations. yii\helpers\BaseMarkdown

公共方法

隐藏继承的方法

方法描述被定义在
process() Converts markdown into HTML. yii\helpers\BaseMarkdown
processParagraph() Converts markdown into HTML but only parses inline elements. yii\helpers\BaseMarkdown

受保护的方法

隐藏继承的方法

方法描述被定义在
getParser() yii\helpers\BaseMarkdown