Directory

← Back

LabelHighlighter extension

Add Highlight.js syntax-highlighting to Labels.

Author

Rating

Popularity

<100

An extension to Vaadins Label. The label will be syntax-highlighted after this extension is attached to it. After changing the text of the label update() must be called to updtae the syntax-highlighting. Alternatively setValue(String value) of this class takes care of changing the text and formatting it.

Uses Highlight.js 9.12.0 from cloudflare cdn.

Sample code

final Label labelc = new Label("select * from thetable where thevalue = 'Hello'",ContentMode.HTML);
final LabelHighlighter label = new LabelHighlighter(labelc);
/* … */
label.setValue("update thetable set thevalue = 'world'");

Compatibility

(Loading compatibility data...)

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

Released
2017-10-21
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.0+
Browser
Browser Independent

LabelHighlighter extension - Vaadin Add-on Directory

Add Highlight.js syntax-highlighting to Labels. LabelHighlighter extension - Vaadin Add-on Directory
An extension to Vaadins Label. The label will be syntax-highlighted after this extension is attached to it. After changing the text of the label update() must be called to updtae the syntax-highlighting. Alternatively setValue(String value) of this class takes care of changing the text and formatting it. Uses Highlight.js 9.12.0 from cloudflare cdn.
Online