Inline code with or without overlays

Any text inside single or double backticks is printed as inline code. Double backticks allow unescaped backticks to be used in the code:

This is $someCode and that is some ` code.

This is `$someCode` and that is ``some ` code``.
Copied!

By convention single backticks are used unless double are needed.

Code roles with language information and overlay

You can also use text roles with one of the predefined languages to display more information to the user. For the most common languages, automatic detection provides more context for the user.

  • $variable = 'Some general PHP'
  • \TYPO3\CMS\Core\Core\Environment TYPO3 class with fully qualified name
  • Environment TYPO3 class with short name
  • \Symfony\Component\Dotenv\Dotenv External class
  • $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] configuration values
  • page = PAGE
  • TCAdefaults.pages.hidden
  • <f:debug>{myVariable}</f:debug>
  • <code>
  • code#mycode {font-family: courier}
  • alert('test')
  • ./vendor/bin/typo3 help
*   :php:`$variable = 'Some general PHP'`
*   :php:`\TYPO3\CMS\Core\Core\Environment` TYPO3 class with fully qualified name
*   :php-short:`\TYPO3\CMS\Core\Core\Environment` TYPO3 class with short name
*   :php:`\Symfony\Component\Dotenv\Dotenv` External class
*   :php:`$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport']` configuration values
*   :typoscript:`page = PAGE`
*   :tsconfig:`TCAdefaults.pages.hidden`
*   :fluid:`<f:debug>{myVariable}</f:debug>`
*   :html:`<code>`
*   :css:`code#mycode {font-family: courier}`
*   :js:`alert('test')`
*   :bash:`./vendor/bin/typo3 help`
Copied!

PHP classes from the TYPO3 Core are automatically linked to https://api.typo3.org and display the PHP doc comment (if any) in the overlay.

All named inline code roles show an overlay where the code can be conveniently copied and information on the language of the code.