|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter
public class DefaultWysiwygConverter
Field Summary | |
---|---|
protected static boolean |
debug
|
protected Set<String> |
macrosToIgnore
This contains a set of macro names which we don't add to the markup, because they are handled in other ways. |
protected WikiStyleRenderer |
renderer
|
static String |
TEXT_SEPARATOR
|
static String |
TEXT_SEPERATOR
Deprecated. use #TEXT_SEPARATOR |
static String |
VALID_END
|
static String |
VALID_START
|
Constructor Summary | |
---|---|
DefaultWysiwygConverter()
|
|
DefaultWysiwygConverter(List<TextConverter> textConverterComponents)
|
Method Summary | |
---|---|
String |
convertChildren(NodeContext nodeContext)
Converts the children of the node in the given node context. |
String |
convertChildren(Node node,
Styles styles,
ListContext listContext,
boolean inTable,
boolean inListItem,
boolean ignoreText,
boolean escapeWikiMarkup,
Node previousSibling)
|
String |
convertNode(NodeContext nodeContext)
Converts the node in the given node context to wiki markup. |
String |
convertWikiMarkupToXHtml(RenderContext ctx,
String wikiMarkup)
|
String |
convertXHtmlToWikiMarkup(String xhtml)
|
String |
getAttribute(Node node,
String name)
Deprecated. As of release 4.1, use NodeUtil.getAttribute(org.w3c.dom.Node, String) . |
String |
getMacroInfoHtml(RenderContext context,
String name,
int xOffset,
int yOffset)
Deprecated. This method seems unused in renderer and will probably be removed in a future version. |
static String |
getRawChildText(Node node,
boolean stripNewlines)
Return the text content of a node, adding newlines for <br> and <p> tags |
static String |
getRawChildTextWithoutReplacement(Node node)
Return the text content of a node, WITHOUT adding newlines for <br> and <p> tags |
String |
getSep(Node previous,
String current,
boolean inTable,
boolean inList)
Deprecated. Since 5.0. Use getSeparator(String, NodeContext) instead. |
String |
getSeparator(String current,
NodeContext nodeContext)
|
protected List<TextConverter> |
getTextConverterComponents()
Can be overridden to provide a different list of content escapers. |
static boolean |
isUserNewline(Node node)
|
void |
setIconManager(IconManager iconManager)
|
void |
setMacroManager(MacroManager macroManager)
|
void |
setWikiStyleRenderer(WikiStyleRenderer renderer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TEXT_SEPARATOR
public static final String TEXT_SEPERATOR
protected static boolean debug
protected WikiStyleRenderer renderer
protected Set<String> macrosToIgnore
public static final String VALID_START
public static final String VALID_END
Constructor Detail |
---|
public DefaultWysiwygConverter()
public DefaultWysiwygConverter(List<TextConverter> textConverterComponents)
Method Detail |
---|
public void setWikiStyleRenderer(WikiStyleRenderer renderer)
public void setMacroManager(MacroManager macroManager)
public String getSeparator(String current, NodeContext nodeContext)
public String getSep(Node previous, String current, boolean inTable, boolean inList)
getSeparator(String, NodeContext)
instead.
getSep
in interface WysiwygConverter
public String convertChildren(Node node, Styles styles, ListContext listContext, boolean inTable, boolean inListItem, boolean ignoreText, boolean escapeWikiMarkup, Node previousSibling)
convertChildren
in interface WysiwygConverter
public String convertChildren(NodeContext nodeContext)
convertChildren(Node, Styles, ListContext, boolean, boolean, boolean, boolean, Node)
.
convertChildren
in interface WysiwygConverter
public String convertNode(NodeContext nodeContext)
convertNode
in interface WysiwygConverter
public static boolean isUserNewline(Node node)
public static String getRawChildText(Node node, boolean stripNewlines)
node
- the node to get the text content fromstripNewlines
- if this is true then strip any newlines from the raw text, but still add newlines for br and p.public static String getRawChildTextWithoutReplacement(Node node)
node
- the node to get the text content frompublic void setIconManager(IconManager iconManager)
public String getMacroInfoHtml(RenderContext context, String name, int xOffset, int yOffset)
getMacroInfoHtml
in interface WysiwygConverter
public String convertXHtmlToWikiMarkup(String xhtml)
convertXHtmlToWikiMarkup
in interface WysiwygConverter
public String convertWikiMarkupToXHtml(RenderContext ctx, String wikiMarkup)
convertWikiMarkupToXHtml
in interface WysiwygConverter
public String getAttribute(Node node, String name)
NodeUtil.getAttribute(org.w3c.dom.Node, String)
.
getAttribute
in interface WysiwygConverter
protected List<TextConverter> getTextConverterComponents()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |