Configuration Reference¶
Feel free to use the constant editor (go to: module template, root page, constant editor, beautyofcode) to edit this settings. Add a Typoscript template to overwrite these settings at any point in your sitetree(s).
TypoScript Reference¶
Properties¶
Property | Data type | stdWrap | Default |
---|---|---|---|
baseUrl | string | no | EXT:beautyofcode/Resources/Public/Javascript/vendor/syntax_highlighter/v2/ |
scripts | string | no | scripts/ |
styles | string | no | styles/ |
includeAsDomReady | boolean | false |
|
brushes | string | no | Xml,JScript,CSharp,Plain |
theme | string | no | Default |
showLabel | boolean | 1 |
|
defaults.tab-size | integer | 4 |
|
defaults.gutter | boolean | 1 |
|
defaults.collapse | boolean | 0 |
Property details¶
baseUrl¶
plugin.tx_beautyofcode.settings.baseUrl =
string
Enter path to the resources directory by using EXT: or FILE: or absolute path (http://your.domain.de/fileadmin/…/res/). Make sure the relative paths res/ and styles/ exists.
Leave empty to use online repository. If you use online repository you shall not edit settings styles and scripts. More info about online hosting see: http://alexgorbatchev.com/wiki/SyntaxHighlighter:Hosting
scripts¶
plugin.tx_beautyofcode.settings.scripts =
string
Path to syntax highlighter core file and to the brushes (Java-Script files), relative to the baseUrl. Leave empty or default when using online repository.
styles¶
plugin.tx_beautyofcode.settings.styles =
string
Path to syntax highlighter css files (css themes), relative to the baseUrl. Leave empty or default when using online repository.
includeAsDomReady¶
plugin.tx_beautyofcode.settings.includeAsDomReady =
boolean
If using standalone version it’s possible to add a JS domReady instead of injecting the code at the bottom of the body. Useful when using minification scripts. Possible options: false, jquery or standalone
brushes¶
plugin.tx_beautyofcode.settings.brushes =
string
Loaded programming languages: Define which programming languages should be available. Less is more: every brush is lazy loaded a single js file.
SyntaxHighlighter: Add a separated list out of: AS3, Bash, ColdFusion, Cpp, CSharp, Css, Delphi, Diff, Erlang, Groovy, Java, JavaFX, JScript, Perl, Php, PowerShell, Python, Ruby, Sass, Scala, Typoscript, Sql, Vb, Xml, Yaml.
Prism: Add a separated list out of: actionscript, applescript, bash, c, clike, coffeescript, cpp, csharp, css, css-extras, diff, erlang, gherkin, git, go, groovy, http, java, javascript, less, markdown, markup, powershell, php, php-extras, plain, python, ruby, sass, scala, scss, sql, twig, typoscript, yaml.
There are much more brushed available for Prism. You might want to extend the brushes files bundled with this extension.
Prism Note: Prism uses its brushes in a dependency manner. For example the clike brush is necessary to load before php`(and therefore must be defined *before* `php in the brushes configuration.
theme¶
plugin.tx_beautyofcode.settings.theme =
string
Define a theme (which is basically a CSS file). Following themes are avaiable:
SyntaxHighlighter: Default, Django, Eclipse, Emacs, FadeToGrey, FelixNagelv3 (which is dark minimal), MDUltra, Midnight, RDark.
Prism: coy, okaidia, dark, funky, okaidia, solarizedlight, tomorrow, twilight.
defaults.tab-size¶
plugin.tx_beautyofcode.settings.defaults.tab-size =
integer
Specify a tabulator size. Tabulator chars will be changed to spaces.
defaults.gutter¶
plugin.tx_beautyofcode.settings.defaults.gutter =
boolean
Show or hide gutter. Helps user to recognize correct line.
defaults.collapse¶
plugin.tx_beautyofcode.settings.defaults.collapse =
boolean
Allows you to force highlighted elements on the page to be collapsed. A link “show source” is displayed instead (not customizable yet). Not available in Prism.