ComboStrap UI - Code

1 - About

The code component:

  • is a wrapper around the HTML code element.
  • takes over the manipulation of the default dokuwiki code block
  • is a wrapper around the Prism component to add:
    • syntax highlighting
    • clipboard copy

You can create block of code like this one:


<code html line-numbers="true">
    <p class="hey">Type some code here</p>
</code>

If you are a developer and want to:
  • shows the output of web language such as HTML, Css or Javascript, you can also use the webcode component.
  • embed your unit test in your documentation, you can use the unit testing component to declare them.

3 - Syntax

This is a Prism component and follows its Prism

You should then see the prism syntax to know how to use the code component.

4 - Configuration

4.1 - Enable / Disable

The code_enable configuration permits to enable / disable this component.

4.2 - Theme

To set the theme, see Prism

Powered by ComboStrap