SmartDown
Smarter Markdown.
Extension Hooks
SmartDown includes two extension hooks:
smartdown_parse_startis called before SmartDown begins processing the target content. This hook will typically be used to modify the raw textual content prior to processing, or change SmartDown’s settings.smartdown_parse_endis called after SmartDown has finished processing the target content. This hook will typically be used to modify the SmartDown-processed textual content. Changing SmartDown’s settings at this point will have no effect.
Parameters
Both extension hooks are called with two parameters.
- The tag data that is being processed. In the case of a SmartDown-formatted custom field, this parameter will contain the field contents. In the case of the SmartDown template tag pair, this parameter will contain whatever text appears inside the SmartDown template tag pair.
- An associative array of SmartDown settings, containing the following keys:
disable:markdown(boolean).disable:smartdown(boolean).ee_tags:encode(boolean)smart_quotes(non-negative integer)
Return values
Hook handlers must return the modified tag data.