Parsing Options

Define parsing options at the field level or at runtime

Doxter provides a field and a filter that can take on custom options for parsing your source markdown.

Parsing Options #

Parsing option can be defined globally when defined in the plugin, per field, when the field is created or per call, when passed to a field method or the |doxter({}) filter.

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
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
addTypographyStylesboolfalseWhether Typography Styles should be applied
startingHeaderLevelstringh1Which tag should be use for the initial header
parseReferenceTagsbooleantrueWhether Reference Tags should be parsed
parseShortcodesbooleantrueWhether Doxter supported shortcodes should be parsed

[Work In Progress]

Please forgive my typos, partial docs, and overall mess.

I'm working hard to get everything moved over and provide amazing docs for you, my loyal supporter.

—Selvin Ortiz

Let’s Work Together


If you’d like to work together, have questions about any of my Craft CMS Plugins or just want to say hello, send me an email.

Email Me