public static interface Drafty.Formatter<T>
Modifier and Type | Method and Description |
---|---|
T |
apply(java.lang.String tp,
java.util.Map<java.lang.String,java.lang.Object> attr,
java.util.List<T> content,
java.util.Stack<java.lang.String> context)
Format one span.
|
T |
wrapText(java.lang.CharSequence text)
Takes CharSequence and wraps it into the type used by formatter.
|
T apply(java.lang.String tp, java.util.Map<java.lang.String,java.lang.Object> attr, java.util.List<T> content, java.util.Stack<java.lang.String> context)
tp
- span style such as "EM", "LN", etc.attr
- attributes of the format, for example URL for "LN" or image for "IM".content
- span content: null, CharSequence, or Listcontext
- styles of parent elements.T wrapText(java.lang.CharSequence text)
text
- text to wrap.