public class DefaultConfluenceWysiwygConverter extends Object implements ConfluenceWysiwygConverter
Set debug to true below to see where newlines in the resulting Wiki markup are coming from.
Constructor and Description |
---|
DefaultConfluenceWysiwygConverter() |
Modifier and Type | Method and Description |
---|---|
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 |
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
|
boolean |
getUserWysiwygPreference()
Deprecated.
since 4.0. Always returns true.
|
void |
setContentEntityManager(ContentEntityManager contentEntityManager) |
void |
setSettingsManager(SettingsManager settingsManager)
Deprecated.
since 5.1. Unused.
|
void |
setWikiStyleRenderer(com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer) |
void |
setWysiwygConverter(com.atlassian.renderer.wysiwyg.WysiwygConverter converter) |
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 convertedpublic String convertWikiMarkupToXHtml(ContentEntityObject content, String wikiMarkup)
ConfluenceWysiwygConverter
convertWikiMarkupToXHtml
in interface ConfluenceWysiwygConverter
content
- - the object the markup is written withinwikiMarkup
- - the text to be convertedpublic 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 convertedpublic String convertXHtmlToWikiMarkup(String xhtml, String pageId)
ConfluenceWysiwygConverter
convertXHtmlToWikiMarkup
in interface ConfluenceWysiwygConverter
xhtml
- - the text to be convertedpageId
- - NOT USEDpublic String convertWikiMarkupToXHtml(String wikiMarkup, String pageId)
ConfluenceWysiwygConverter
convertWikiMarkupToXHtml
in interface ConfluenceWysiwygConverter
wikiMarkup
- - the text to be convertedpageId
- - id of the objectpublic 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 nullpublic 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
If the preference isn't set, the global settings are checked and returned.
getUserWysiwygPreference
in interface ConfluenceWysiwygConverter
public void setContentEntityManager(ContentEntityManager contentEntityManager)
Copyright © 2003–2018 Atlassian. All rights reserved.