Standard

The code component accepts optional language parameter. When syntax highlighting is available, language is used to determing syntax of the element.

To remove extra spacing from the left, dedent parameter can be used. When set to true, the component will try to determine the minimum indentation of all lines and remove it from the beginning of each line.

{%- call ui.util.call(show_example) -%} {%- raw %} {%- call ui.util.call(ui.code) -%} {%- filter forceescape %} {%- endfilter %} {%- endcall %} {%- call ui.util.call(ui.code, language="html", dedent=true) -%} {%- filter forceescape %} {%- endfilter %} {%- endcall %} {%- endraw %} {%- endcall %}