# j-HighlightSyntax

> Simple syntax highlighter with help of Highlight.js.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 6a7ebd4abf86a54e45af02a55d43b61d2c410cf42ce822d9fa6c650ddf3bab29
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

Simple syntax highlighter with help of __Highlight.js__.


__Configuration__:

- `type` needs to contain a content-type for highlighting

Use it with `<ui-component name="highlightsyntax">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<ui-component name="highlightsyntax" path="exampleHTML" config="type:html"></ui-component>
<ui-component name="highlightsyntax" path="exampleJS" config="type:js"></ui-component>
<ui-component name="highlightsyntax" path="exampleCSS" config="type:css"></ui-component>

<script>
	var exampleHTML = "This is <b>HTML</b>";
	var exampleJS = "var a = 0;";
	var exampleCSS = "body { color: red; }";
</script>
```
