Class Snippet
- java.lang.Object
-
- com.vaadin.shared.ui.richtextarea.Snippet
-
- All Implemented Interfaces:
Serializable
public class Snippet extends Object implements Serializable
Supporting data structure for snippets feature.- Since:
- 8.16
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getText()
Get the snippet content text.String
getTitle()
Get the set title text (either a user-specified string or up to 20 characters of the main snippet text.
-
-
-
Constructor Detail
-
Snippet
public Snippet()
Creates an empty snippet
-
Snippet
public Snippet(String text)
Creates a snippet with a specified body text. Title is automatically generated from the first 20 characters in the text, with ellipsis added if the length exceeds 20 characters.- Parameters:
text
- body text, may contain HTML markup
-
-