public interface RichTextHandler
| Modifier and Type | Method and Description |
|---|---|
void |
addContent(String text,
org.jdom2.Element parent)
Adds rich text content to given HTML element.
|
void |
addContent(String text,
org.jdom2.Element parent,
boolean supressParsingError)
Adds rich text content to given HTML element.
|
void |
addPlaintextContent(String text,
org.jdom2.Element parent)
Add multi line plain text to parent element.
|
List<org.jdom2.Content> |
getContent(String text)
Gets rich text content as DOM elements.
|
boolean |
isEmpty(String text)
Check if the given formatted text block is empty.
|
void addContent(String text, org.jdom2.Element parent) throws org.jdom2.JDOMException
text - XHTML text string (root element not needed)parent - Parent HTML elementorg.jdom2.JDOMException - Is thrown if the text could not be parsed as XHTMLvoid addContent(String text, org.jdom2.Element parent, boolean supressParsingError)
text - XHTML text string (root element not needed)parent - Parent HTML elementsupressParsingError - If set to true, parsing errors (JDOMExceptions) are suppressed, and logged only in
debug mode. Otherwise the JDOMException is wrapped in a IllegalArgumentException and thrown again.IllegalArgumentException - Is thrown if the text cannot be parsed, and pSuppressParsingError is not set to
truevoid addPlaintextContent(String text, org.jdom2.Element parent)
text - Multiline textparent - Parent HTML elementList<org.jdom2.Content> getContent(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 XHTMLboolean isEmpty(String text)
text - XHTML text string (root element not needed)Copyright © 2014 wcm.io. All rights reserved.