ForgeKomponenty
cs

Komponenty

j-HighlightSyntax

jComponent 20 · jcomponent@20 component Příklad načten s jComponent 20

Jednoduchý syntax highlight s pomocí Highlight.js.


Konfigurace:

  • type musí obsahovat typ obsahu pro zvýraznění

Použijte ji s <ui-component name="highlightsyntax">Pokud je součástka ještě nezačleněna, jComponent Stáhnout ji na první použití z adresy DEF.fallback a) The Componentator CDN dle předvolby. autor: Peter Širka. zdroj: Componentator Výrobce je autorizován, MIT licence.

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>