ForgeKomponenty
pl

Komponenty

j-HighlightSyntax

jComponent 20 · jcomponent@20 component Przykład załadowany z jComponent 20

Łatwa syntax highlight z pomocą Highlight.js.


Konfiguracja:

  • type musi zawierać typ treści do podkreślenia

Użyj go z <ui-component name="highlightsyntax">Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu DEF.fallback (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.

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>