是否可以在vaadin标签中绘制html内容?
我有短信 <br>
内容。可以让厂牌使用吗?
最佳答案
是的,您可以使用2 argument constructor of Label
并设置 ContentMode
到 HTML
。
类似于,
new Label(YOUR_HTML_TEXT, ContentMode.HTML);
来自 Javadoc(上面链接):
Label component for showing non-editable short texts. The label content can be set to the modes specified by ContentMode
The contents of the label may contain simple formatting:
- Bold
- Italic
- Underlined
- Linebreak
- ...
关于java - vaadin 标签中的 Html 内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24491910/