PHP Class kartik\markdown\Markdown

Since: 1.0
Author: Kartik Visweswaran ([email protected])
Datei anzeigen Open project: kartik-v/yii2-markdown Class Usage Examples

Protected Properties

Property Type Description
$markdown Michelf\MarkdownExtra

Public Methods

Method Description
convert ( string $content, array $config = [], integer $smartyMode = self::SMARTYPANTS_ATTR_LONG_EM_DASH_SHORT_EN ) : string Converts markdown into HTML
customProcess ( string $content, array $config = [] ) : string Custom conversion of patterns
process ( string $content, array $config = [] ) : string Converts markdown into HTML

Method Details

convert() public static method

Converts markdown into HTML
public static convert ( string $content, array $config = [], integer $smartyMode = self::SMARTYPANTS_ATTR_LONG_EM_DASH_SHORT_EN ) : string
$content string
$config array . Options to configure MarkdownExtra and smarty - markdown: array for MarkdownExtra configuration parameters - smarty: array for SmartyPantsTypographer configuration parameters - custom: array for Custom configuration parameters
$smartyMode integer the SmartyPantsTypographer processing mode
return string

customProcess() public static method

Custom conversion of patterns
public static customProcess ( string $content, array $config = [] ) : string
$content string
$config array . List of key value pairs to find and replace
return string

process() public static method

Converts markdown into HTML
public static process ( string $content, array $config = [] ) : string
$content string
$config array
return string

Property Details

$markdown protected_oe static_oe property

protected static MarkdownExtra,Michelf $markdown
return Michelf\MarkdownExtra