Feature Tour

Parsing Options

Parsing options control how Doxter turns source text into HTML. Set shared defaults in the plugin configuration, choose field-specific behaviour when creating a field, or pass options for one rendering call. A per-call option is useful when the same content appears in more than one context.

For example, a full article might need linkable headings, while a short preview should omit those anchors. The examples below disable heading anchors and shortcode parsing for the current rendering call.

Parsing Filter doxter

{% set options = {
    parseShortcodes: false,
    addHeaderAnchors: false
} %}

{{ '# Doxter Rules' | doxter(options) }}

doxterFieldHandle.html(options)

{% set options = {
    parseShortcodes: false,
    addHeaderAnchors: false
} %}

{{ entry.doxterFieldHandle.html(options) }}

Option Reference

OptionTypeDefaultDescription
codeBlockSnippetstring''See Fenced Code Blocks.
allowUnsafeHtmlbooleanfalseWhether to skip HTML purification. Enable this only for developer-controlled content.
purifierConfigarray['Attr.EnableID' => true]Configuration passed to Craft’s HTML purifier.
addHeaderAnchorsbooleantrueWhether to parse headers and add anchors for direct linking.
addHeaderAnchorsToarray[h1, h2, h3]Which headers to add anchors to if header parsing is enabled.
addTypographyStylesbooleantrueWhether Typography Styles should be applied.
addTypographyHyphenationbooleantrueWhether typography processing also adds hyphenation, using the current site language. Only applies when addTypographyStyles is enabled.
startingHeaderLevelint1The heading level, from 1 to 6, that a top-level Markdown heading becomes. Lower headings shift by the same amount, so 2 turns # into h2 and ## into h3. Only applies when addHeaderAnchors is enabled.
parseReferenceTagsbooleantrueWhether Reference Tags should be parsed.
parseShortcodesbooleantrueWhether Doxter supported shortcodes should be parsed.