Class kartik\markdown\Markdown
| Inheritance | kartik\markdown\Markdown |
|---|---|
| Available since version | 1.0 |
Markdown provides concrete implementation for PHP Markdown Extra and PHP SmartyPantsTypographer.
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $markdown | \Michelf\MarkdownExtra | kartik\markdown\Markdown |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| convert() | Converts markdown into HTML | kartik\markdown\Markdown |
| customProcess() | Custom conversion of patterns | kartik\markdown\Markdown |
| process() | Converts markdown into HTML | kartik\markdown\Markdown |
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| SMARTYPANTS_ATTR_DO_NOTHING | 0 | kartik\markdown\Markdown | |
| SMARTYPANTS_ATTR_EM_DASH | 1 | kartik\markdown\Markdown | |
| SMARTYPANTS_ATTR_LONG_EM_DASH_SHORT_EN | 2 | kartik\markdown\Markdown | |
| SMARTYPANTS_ATTR_SHORT_EM_DASH_LONG_EN | 3 | kartik\markdown\Markdown |
Property Details
Method Details
Converts markdown into HTML
| public static string convert ( $content, $config = [], $smartyMode = self::SMARTYPANTS_ATTR_LONG_EM_DASH_SHORT_EN ) | ||
| $content | string | |
| $config | array | . Options to configure MarkdownExtra and smarty
|
| $smartyMode | integer | The SmartyPantsTypographer processing mode |
| throws | yii\base\InvalidConfigException | if module not set |
|---|---|---|
Custom conversion of patterns
| public static string customProcess ( $content, $config = [] ) | ||
| $content | string | |
| $config | array | . List of key value pairs to find and replace |
Converts markdown into HTML
| public static string process ( $content, $config = [] ) | ||
| $content | string | |
| $config | array | |