|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.pages.wysiwyg.DefaultConfluenceWysiwygConverter
public class DefaultConfluenceWysiwygConverter
When debugging this code, see SimpleMarkupTest for test cases. The XHTML coming into this code is not what is important -- you need to look at the post JTidy XHTML, which you can see in the 'out' ByteArray.
Set debug to true below to see where newlines in the resulting Wiki markup are coming from.
Constructor Summary | |
---|---|
DefaultConfluenceWysiwygConverter()
|
Method Summary | |
---|---|
String |
convertToPreview(String inputText,
String contentId,
String spaceKey,
String fromMode)
Converts text into XHTML for Preview |
String |
convertWikiMarkupToXHtml(ContentEntityObject content,
String wikiMarkup)
Converts wiki markup text into XHTML, using the page context of the content object. |
String |
convertWikiMarkupToXHtml(ContentEntityObject content,
String spaceKey,
String wikiMarkup)
Converts wiki markup text into XHTML, using the page context of the content object. |
String |
convertWikiMarkupToXHtml(String wikiMarkup,
String pageId)
Converts wiki markup text into XHTML, using the page context of the content object specified by the id. |
String |
convertWikiMarkupToXHtml(String wikiMarkup,
String pageId,
String spaceKey)
Converts wiki markup text into XHTML, using the page context of the content object specified by the id. |
String |
convertWikiMarkupToXHtmlWithoutPage(String wikiMarkup,
String pageId)
TODO - remove this method from the interface |
String |
convertXHtmlToWikiMarkup(ContentEntityObject content,
String xhtml)
Converts XHTML into wiki markup, using the page context of the content object |
String |
convertXHtmlToWikiMarkup(String xhtml,
String pageId)
Converts XHTML into wiki markup, without using page context |
String |
convertXHtmlToWikiMarkupWithoutPage(String xhtml,
String pageId)
TODO - remove this method from the interface |
boolean |
getUserWysiwygPreference()
Deprecated. since 4.0. Always returns true. |
void |
setContentEntityManager(ContentEntityManager contentEntityManager)
|
void |
setSettingsManager(SettingsManager settingsManager)
|
void |
setWikiStyleRenderer(com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer)
|
void |
setWysiwygConverter(com.atlassian.renderer.wysiwyg.WysiwygConverter converter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultConfluenceWysiwygConverter()
Method Detail |
---|
public void setSettingsManager(SettingsManager settingsManager)
public void setWysiwygConverter(com.atlassian.renderer.wysiwyg.WysiwygConverter converter)
public void setWikiStyleRenderer(com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer)
public String convertXHtmlToWikiMarkup(ContentEntityObject content, String xhtml)
ConfluenceWysiwygConverter
convertXHtmlToWikiMarkup
in interface ConfluenceWysiwygConverter
content
- - the content object the markup is writen withinxhtml
- - the text to be converted
public String convertWikiMarkupToXHtml(ContentEntityObject content, String wikiMarkup)
ConfluenceWysiwygConverter
convertWikiMarkupToXHtml
in interface ConfluenceWysiwygConverter
content
- - the object the markup is written withinwikiMarkup
- - the text to be converted
public String convertWikiMarkupToXHtml(ContentEntityObject content, String spaceKey, String wikiMarkup)
ConfluenceWysiwygConverter
convertWikiMarkupToXHtml
in interface ConfluenceWysiwygConverter
content
- - the object the markup is written withinspaceKey
- - the space in which the content is written, used when content is nullwikiMarkup
- - the text to be converted
public String convertXHtmlToWikiMarkupWithoutPage(String xhtml, String pageId)
ConfluenceWysiwygConverter
convertXHtmlToWikiMarkupWithoutPage
in interface ConfluenceWysiwygConverter
xhtml
- - the text to be convertedpageId
- - NOT USED
public String convertXHtmlToWikiMarkup(String xhtml, String pageId)
ConfluenceWysiwygConverter
convertXHtmlToWikiMarkup
in interface ConfluenceWysiwygConverter
xhtml
- - the text to be convertedpageId
- - NOT USED
public String convertWikiMarkupToXHtmlWithoutPage(String wikiMarkup, String pageId)
ConfluenceWysiwygConverter
convertWikiMarkupToXHtmlWithoutPage
in interface ConfluenceWysiwygConverter
wikiMarkup
- - the text to be convertedpageId
- - id of the object
public String convertWikiMarkupToXHtml(String wikiMarkup, String pageId)
ConfluenceWysiwygConverter
convertWikiMarkupToXHtml
in interface ConfluenceWysiwygConverter
wikiMarkup
- - the text to be convertedpageId
- - id of the object
public String convertWikiMarkupToXHtml(String wikiMarkup, String pageId, String spaceKey)
ConfluenceWysiwygConverter
convertWikiMarkupToXHtml
in interface ConfluenceWysiwygConverter
wikiMarkup
- - the text to be convertedpageId
- - id of the objectspaceKey
- - the space in which the content is written, used when content is null
public String convertToPreview(String inputText, String contentId, String spaceKey, String fromMode)
ConfluenceWysiwygConverter
convertToPreview
in interface ConfluenceWysiwygConverter
inputText
- - text to be converted (can be either XHTML or Wiki Markup)contentId
- - the id of the content that the text is written withinspaceKey
- - if the content object doesn't exist the space key is usedfromMode
- - the form that the text is in (AbstractPageAction.RICHTEXT or AbstractPageAction.MARKUP)
@Deprecated public boolean getUserWysiwygPreference()
ConfluenceWysiwygConverter
getUserWysiwygPreference
in interface ConfluenceWysiwygConverter
public void setContentEntityManager(ContentEntityManager contentEntityManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |