|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter
public class DefaultWysiwygConverter
| Field Summary | |
|---|---|
static java.lang.String |
CURSOR_PLACEMENT_CLASS
Class given to paragraphs whose purpose is to allow somewhere for the cursor to go after a macro. |
static java.lang.String |
CURSOR_PLACEMENT_PARAGRAPH
A Cursor placement paragraph provides a place to put the cursor after the final macro or table on a page, or before the first macro or table on a page. |
protected static boolean |
debug
|
protected java.util.Set<java.lang.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 java.lang.String |
TEXT_SEPARATOR
|
static java.lang.String |
TEXT_SEPERATOR
Deprecated. use #TEXT_SEPARATOR |
static java.lang.String |
VALID_END
|
static java.lang.String |
VALID_START
|
| Constructor Summary | |
|---|---|
DefaultWysiwygConverter()
|
|
DefaultWysiwygConverter(java.util.List<TextConverter> textConverterComponents)
|
|
| Method Summary | |
|---|---|
java.lang.String |
convertChildren(NodeContext nodeContext)
Converts the children nodes of the given node in the node context to wiki markup. |
java.lang.String |
convertChildren(org.w3c.dom.Node node,
Styles styles,
ListContext listContext,
boolean inTable,
boolean inListItem,
boolean ignoreText,
boolean escapeWikiMarkup,
org.w3c.dom.Node previousSibling)
Deprecated. Since 5.0. Use convertChildren(NodeContext) instead. |
java.lang.String |
convertNode(NodeContext nodeContext)
Converts the node in the given node context to wiki markup. |
java.lang.String |
convertWikiMarkupToXHtml(RenderContext ctx,
java.lang.String wikiMarkup)
|
java.lang.String |
convertXHtmlToWikiMarkup(java.lang.String xhtml)
|
java.lang.String |
getAttribute(org.w3c.dom.Node node,
java.lang.String name)
Deprecated. As of release 4.1, use NodeUtil.getAttribute(org.w3c.dom.Node, String). |
java.lang.String |
getMacroInfoHtml(RenderContext context,
java.lang.String name,
int xOffset,
int yOffset)
Deprecated. This method seems unused in renderer and will probably be removed in a future version. |
static java.lang.String |
getRawChildText(org.w3c.dom.Node node,
boolean stripNewlines)
Return the text content of a node, adding newlines for <br> and <p> tags |
static java.lang.String |
getRawChildTextWithoutReplacement(org.w3c.dom.Node node)
Return the text content of a node, WITHOUT adding newlines for <br> and <p> tags |
java.lang.String |
getSep(org.w3c.dom.Node previous,
java.lang.String current,
boolean inTable,
boolean inList)
Deprecated. Since 5.0. Use getSeparator(String, NodeContext) instead. This method is quite broken
in 6.0 since it does not respect NodeContext.isInHeading(). |
java.lang.String |
getSeparator(java.lang.String current,
NodeContext nodeContext)
Determine the appropriate separation string to place between the wiki markup for the previous node and the current node based on their type and the current table/list/heading (etc.) context. |
protected java.util.List<TextConverter> |
getTextConverterComponents()
Can be overridden to provide a different list of content escapers. |
static boolean |
isUserNewline(org.w3c.dom.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 java.lang.String TEXT_SEPARATOR
public static final java.lang.String TEXT_SEPERATOR
public static final java.lang.String CURSOR_PLACEMENT_CLASS
public static final java.lang.String CURSOR_PLACEMENT_PARAGRAPH
convertWikiMarkupToXHtml(RenderContext, String).
protected static boolean debug
protected WikiStyleRenderer renderer
protected java.util.Set<java.lang.String> macrosToIgnore
public static final java.lang.String VALID_START
public static final java.lang.String VALID_END
| Constructor Detail |
|---|
public DefaultWysiwygConverter()
public DefaultWysiwygConverter(java.util.List<TextConverter> textConverterComponents)
| Method Detail |
|---|
public void setWikiStyleRenderer(WikiStyleRenderer renderer)
public void setMacroManager(MacroManager macroManager)
public java.lang.String getSeparator(java.lang.String current,
NodeContext nodeContext)
current - the "type" of the current node, see TypeBasedSeparationnodeContext - the current nodeContext.
public java.lang.String getSep(org.w3c.dom.Node previous,
java.lang.String current,
boolean inTable,
boolean inList)
getSeparator(String, NodeContext) instead. This method is quite broken
in 6.0 since it does not respect NodeContext.isInHeading().
getSep in interface WysiwygConverterpublic java.lang.String convertChildren(NodeContext nodeContext)
WysiwygConverter
convertChildren in interface WysiwygConverter
public java.lang.String convertChildren(org.w3c.dom.Node node,
Styles styles,
ListContext listContext,
boolean inTable,
boolean inListItem,
boolean ignoreText,
boolean escapeWikiMarkup,
org.w3c.dom.Node previousSibling)
convertChildren(NodeContext) instead.
convertChildren(Node, Styles, ListContext, boolean, boolean, boolean, boolean, Node).
convertChildren in interface WysiwygConverterpublic java.lang.String convertNode(NodeContext nodeContext)
convertNode in interface WysiwygConverterpublic static boolean isUserNewline(org.w3c.dom.Node node)
public static java.lang.String getRawChildText(org.w3c.dom.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 java.lang.String getRawChildTextWithoutReplacement(org.w3c.dom.Node node)
node - the node to get the text content frompublic void setIconManager(IconManager iconManager)
public java.lang.String getMacroInfoHtml(RenderContext context,
java.lang.String name,
int xOffset,
int yOffset)
getMacroInfoHtml in interface WysiwygConverterpublic java.lang.String convertXHtmlToWikiMarkup(java.lang.String xhtml)
convertXHtmlToWikiMarkup in interface WysiwygConverter
public java.lang.String convertWikiMarkupToXHtml(RenderContext ctx,
java.lang.String wikiMarkup)
convertWikiMarkupToXHtml in interface WysiwygConverter
public java.lang.String getAttribute(org.w3c.dom.Node node,
java.lang.String name)
NodeUtil.getAttribute(org.w3c.dom.Node, String).
getAttribute in interface WysiwygConverterprotected java.util.List<TextConverter> getTextConverterComponents()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||