About
The file component is a component that represents the content of a file.
It's a prism component that add:
- syntax highlighting
- and clipboard copy
Example
You can create block of code like this one:
# Markdown header
The `file` component:
* takes over the manipulation of the default [dokuwiki file block](http://www.dokuwiki.org/wiki%3Asyntax#code_blocks)
* is a wrapper around the [Prism component](/prism) to add:
* syntax highlighting
* clipboard copy
Syntax
This is a Prism component and follows the prism syntax. You should then check the prism syntax documentation for all details.
Configuration
Enable / Disable
The file_enable configuration permits to enable / disable this component.
If the component is disable, the dokuwiki file block is applied.
Theme
This component gets the theme chosen
For custom css style, there is also an extra userstyle class created on the pre element with the pref suffix. This element contains the code and the button.
Example:
- Change the background color of file.
.file-combo-pre{
background-color: #e9ecef !important;
}