Syntax.js - Documentation - Configuration Options

Below is the JSON format and properties that can be used for the configuration options.

Download Now

v3.0.1 - 18th Jul 2024
JSON Properties

Options:

Type: Name: Description:
boolean safeMode States if safe-mode is enabled (errors will be ignored and logged only, defaults to true).
Object highlightAllDomElementTypes The DOM element types to lookup (can be either an array of strings, or a space separated string, and defaults to "div" and "code").
boolean allowHtmlInTextDisplay States if HTML can be used for text displays, i.e. Tabs, Descriptions, etc (defaults to true).


Options - Strings:

Category: Type: Name: Description:
text string buttonsOpenerText States the text that should be used for the open buttons button (defaults to "←").
text string buttonsCloserText States the text that should be used for the close buttons button (defaults to "→").
text string objectErrorText States the error message that should be shown for object parsing errors (defaults to "Errors in object: {{error_1}}, {{error_2}}").
text string attributeNotSetErrorText States the error message that should be shown for attribute not errors (defaults to "The attribute '{{attribute_name}}' has not been set correctly.").
text string languageNotSupportedErrorText states the error text that should be shown when a language detected is not supported (defaults to "Language '{{language}}' is not supported.").
text string noCodeAvailableToRenderErrorText States the error text that should be shown when there is no code to render (defaults to "No code is available to render.").
text string copyButtonText The text that should be displayed for the "Copy" button.
text string printButtonText The text that should be displayed for the "Print" button.