prism-element
Syntax / code highlighting via the Prism webcomponent.
Integration of the <prism-element> Webcomponent. Enables you to display syntax highlighted code via Prism.
Sample code
new PrismHighlighter("p { color: blue; }"); new PrismHighlighter("p { color: blue; }","css"); new PrismHighlighter("@Route(\"\")\n" + "public class DemoView extends VerticalLayout {\n" + "\n" + " public DemoView() {\n" + " add(\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\"),\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\"),\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\"),\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\")\n" + " );\n" + " }\n" + "}\n"); new PrismHighlighter("@Route(\"\")\n" + "public class DemoView extends VerticalLayout {\n" + "\n" + " public DemoView() {\n" + " add(\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\"),\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\"),\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\"),\n" + " new PrismHighlighter(\"<style>p { color: blue; }</style>\", \"html\")\n" + " );\n" + " }\n" + "}\n","java");
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
- updated dependencies
The compatibility mode is currently not supported!
- Released
- 2019-09-30
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 14+
- Vaadin 10+ in 0.5
- Browser
- Firefox
- Google Chrome
- Microsoft Edge
prism-element - Vaadin Add-on Directory
Syntax / code highlighting via the Prism webcomponent.Integration of the \ Webcomponent. Enables you to display syntax highlighted code via Prism.
SourceOnline Demo
Webcomponent
prism-element version 0.7
- fixed issues with java code syntax highlighting
prism-element version 2.0.0.beta1
- ported to Polymer 3
- allowed using your own styles
## *The compatibility mode is currently not supported!*
prism-element version 2.0.0.beta2
- updated dependencies
## *The compatibility mode is currently not supported!*