Configuration
You can customise Doxter’s settings using a PHP configuration file. This is optional: each setting has a default, so you only need to include the values you want to change.
To override a setting, create doxter.php in your Craft project’s /config directory and return an array of setting names and values. For example, the following will disable automatic heading anchors:
<?php
return [
'addHeaderAnchors' => false,
];All other settings keep their defaults. Add any further settings you want to change to the same array. The options below explain the available settings and their defaults. You can also manage many of these settings in the control panel under Settings → Doxter.
Configuration Options
Maps shortcode names to site template paths. Template paths are relative to the Craft project’s templates directory. Doxter includes opt-in starter templates for audio, image and video shortcodes; follow the shortcode setup instructions to copy, map and verify them.
Text to wrap code blocks for syntax highlighting.
Whether Doxter should return parsed HTML without purification. Leave this disabled for content written by editors or received from front-end forms. Enable it only when every source string and shortcode parameter is controlled by a developer who is trusted to add executable markup to the site.
This setting is available only in config/doxter.php or as a per-call parsing option, so changing the output trust policy remains a developer decision.
Configuration passed to Craft’s HTML purifier. Doxter enables HTML IDs so linkable headings continue to work. Add narrowly scoped allowances here when trusted shortcode templates need markup that the default purifier removes.
For example, this configuration permits Vimeo player iframes while continuing to purify the rest of the generated HTML:
<?php
return [
'purifierConfig' => [
'HTML.SafeIframe' => true,
'URI.SafeIframeRegexp' => '%^https://player.vimeo.com/video/%',
],
];Like allowUnsafeHtml, this setting is available only in config/doxter.php or as a per-call parsing option.
Whether to enable header anchor parsing.
Set which headers to make linkable.
Set the starting header level (as a number, 1-6).
Whether to add typography hyphenation.
Whether to add typography styles.
Whether to parse reference tags.
Whether to parse shortcodes.