@ProviderType public final class RichTextUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addParsedText(@NotNull org.jdom2.Element parent,
@NotNull String text)
Parses XHTML text string, and adds to parsed content to the given parent element.
|
static void |
addParsedText(@NotNull org.jdom2.Element parent,
@NotNull String text,
boolean xhtmlEntities)
Parses XHTML text string, and adds to parsed content to the given parent element.
|
static boolean |
isEmpty(@Nullable String text)
Check if the given formatted text block is empty.
|
static boolean |
isEmpty(@Nullable String text,
int treshold)
Check if the given formatted text block is empty.
|
static org.jdom2.Element |
parseText(@NotNull String text)
Parses XHTML text string.
|
static @NotNull org.jdom2.Element |
parseText(@NotNull String text,
boolean xhtmlEntities)
Parses XHTML text string.
|
static void |
rewriteContent(@NotNull org.jdom2.Element parent,
@NotNull RewriteContentHandler rewriteContentHandler)
Rewrites all children/sub-tree of the given parent element.
|
public static boolean isEmpty(@Nullable
@Nullable String text)
text - XHTML text string (root element not needed)public static boolean isEmpty(@Nullable
@Nullable String text,
int treshold)
text - XHTML text string (root element not needed)treshold - Treshold value - only strings with less than this number of characters are checked.public static void addParsedText(@NotNull
@NotNull org.jdom2.Element parent,
@NotNull
@NotNull String text)
throws org.jdom2.JDOMException
parent - Parent element to add parsed content totext - XHTML text string (root element not needed)org.jdom2.JDOMException - Is thrown if the text could not be parsed as XHTMLpublic static void addParsedText(@NotNull
@NotNull org.jdom2.Element parent,
@NotNull
@NotNull String text,
boolean xhtmlEntities)
throws org.jdom2.JDOMException
parent - Parent element to add parsed content totext - XHTML text string (root element not needed)xhtmlEntities - If set to true, Resolving of XHtml entities in XHtml fragment is supported.org.jdom2.JDOMException - Is thrown if the text could not be parsed as XHTMLpublic static org.jdom2.Element parseText(@NotNull
@NotNull String text)
throws org.jdom2.JDOMException
text - XHTML text string (root element not needed)org.jdom2.JDOMException - Is thrown if the text could not be parsed as XHTML@NotNull
public static @NotNull org.jdom2.Element parseText(@NotNull
@NotNull String text,
boolean xhtmlEntities)
throws org.jdom2.JDOMException
text - XHTML text string (root element not needed)xhtmlEntities - If set to true, Resolving of XHtml entities in XHtml fragment is supported.org.jdom2.JDOMException - Is thrown if the text could not be parsed as XHTMLpublic static void rewriteContent(@NotNull
@NotNull org.jdom2.Element parent,
@NotNull
@NotNull RewriteContentHandler rewriteContentHandler)
parent - Parent elementrewriteContentHandler - Rewrite content handlerCopyright © 2014–2019 wcm.io. All rights reserved.