Not seeing the updated content on this page! Hard refresh your browser to clean cache for this page (e.g. SHIFT-F5 on Windows Chrome)
The output of the conversion is determined based on these parameters at the module configuration level:
smartyPants
: boolean determining whether to use PHP SmartyPantsTypographer to process Markdown outputcustomConversion
: array list of custom conversion patterns provided to find and replace as key-value pairsIn addition, the following variables can be passed to the Markdown::convert()
function.
$content
: string the content to convert.$config
: array the configuration of Markdown formats to process. The following formatting parameters are set in config
:
markdown
: array configuration parameters for PHP Markdown Extrasmarty
: array configuration parameters for PHP SmartyPantsTypographercustom
: array configuration parameters for custom processing. This will override the customConversion
set at module level. This is set as (key
=> value
) pairs, where each key
will be scanned and replaced with value
$smartyMode
: integer determining the mode of PHP SmartyPantsTypographer. Defaults to SMARTYPANTS_ATTR_LONG_EM_DASH_SHORT_EN
.
SMARTYPANTS_ATTR_DO_NOTHING
= 0
: SmartyPantsTypographer does nothing at allSMARTYPANTS_ATTR_EM_DASH
= 1
: "--" for em-dashes; no en-dash supportSMARTYPANTS_ATTR_LONG_EM_DASH_SHORT_EN
= 2
: "---" for em-dashes; "--" for en-dashesSMARTYPANTS_ATTR_SHORT_EM_DASH_LONG_EN
= 3
: "--" for em-dashes; "---" for en-dashes Use 3 dashes `—` for em-dash. Use 2 dashes `–` for an en-dash or ranges (e.g. “It’s all in chapters 12–14”).
Use 3 dashes `---` for em-dash. Use 2 dashes `--` for an en-dash or ranges (e.g. "It's all in chapters 12--14").
use kartik\markdown\Markdown; $content = '<p>Use 3 dashes `---` for em-dash. ' . 'Use 2 dashes `--` for an en-dash or ranges (e.g. "It\'s all in chapters 12--14").</p>'; // with custom post processing echo Markdown::convert($content, ['custom' => [ '<p>' => '<p class="text-info">' ]]); // set smarty mode echo Markdown::convert($content, [], Markdown::SMARTYPANTS_ATTR_DO_NOTHING);
use kartik\markdown\Markdown; $content = '### Heading 3 ###'; echo Markdown::process($content);
Comments & Discussion
Note
You can now visit the Krajee Webtips Q & A forum for searching OR asking questions OR helping programmers with answers on these extensions and plugins. For asking a question click here. Select the appropriate question category (i.e. Krajee Plugins) and choose this current page plugin in the question related to field.
The comments and discussion section below are intended for generic discussions or feedback for this plugin. Developers may not be able to search or lookup here specific questions or tips on usage for this plugin.