com.atlassian.confluence.pages.wysiwyg
Interface ConfluenceWysiwygConverter

All Known Implementing Classes:
DefaultConfluenceWysiwygConverter

public interface ConfluenceWysiwygConverter

Confluence-specific wysiwig converter for rendering wiki markup in XHTML and vice versa.


Method Summary
 String convertToPreview(String inputText, String pageIdString, 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. Users are no longer able to set a user preference.
 

Method Detail

convertWikiMarkupToXHtml

String convertWikiMarkupToXHtml(ContentEntityObject content,
                                String wikiMarkup)
Converts wiki markup text into XHTML, using the page context of the content object. If content is null, use convertWikiMarkupToXHtml(ContentEntityObject content, String spaceKey, String wikiMarkup)

Parameters:
content - - the object the markup is written within
wikiMarkup - - the text to be converted
Returns:
converted XHTML

convertWikiMarkupToXHtml

String convertWikiMarkupToXHtml(ContentEntityObject content,
                                String spaceKey,
                                String wikiMarkup)
Converts wiki markup text into XHTML, using the page context of the content object. If content is null, the spaceKey is used to define the page context.

Parameters:
content - - the object the markup is written within
spaceKey - - the space in which the content is written, used when content is null
wikiMarkup - - the text to be converted
Returns:
converted XHTML

convertWikiMarkupToXHtml

String convertWikiMarkupToXHtml(String wikiMarkup,
                                String pageId)
Converts wiki markup text into XHTML, using the page context of the content object specified by the id. If content is null, use convertWikiMarkupToXHtml(ContentEntityObject content, String spaceKey, String wikiMarkup)

Parameters:
wikiMarkup - - the text to be converted
pageId - - id of the object
Returns:
converted XHTML

convertWikiMarkupToXHtml

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. If content is null, the spaceKey is used to define the page context.

Parameters:
wikiMarkup - - the text to be converted
pageId - - id of the object
spaceKey - - the space in which the content is written, used when content is null
Returns:
converted XHTML

convertXHtmlToWikiMarkup

String convertXHtmlToWikiMarkup(ContentEntityObject content,
                                String xhtml)
Converts XHTML into wiki markup, using the page context of the content object

Parameters:
content - - the content object the markup is writen within
xhtml - - the text to be converted
Returns:
converted wiki markup

convertXHtmlToWikiMarkup

String convertXHtmlToWikiMarkup(String xhtml,
                                String pageId)
Converts XHTML into wiki markup, without using page context

Parameters:
xhtml - - the text to be converted
pageId - - NOT USED
Returns:
converted wiki markup

convertToPreview

String convertToPreview(String inputText,
                        String pageIdString,
                        String spaceKey,
                        String fromMode)
Converts text into XHTML for Preview

Parameters:
inputText - - text to be converted (can be either XHTML or Wiki Markup)
pageIdString - - the id of the content that the text is written within
spaceKey - - if the content object doesn't exist the space key is used
fromMode - - the form that the text is in (AbstractPageAction.RICHTEXT or AbstractPageAction.MARKUP)
Returns:
converted XHTML

getUserWysiwygPreference

@Deprecated
boolean getUserWysiwygPreference()
Deprecated. since 4.0. Users are no longer able to set a user preference.

Retrieves the user's WYSIWYG editor preference and returns it. If the preference isn't set, the global settings are checked and returned.

Returns:
True if the use has set the WYSIWYG editor as the default, false otherwise


Copyright © 2003-2013 Atlassian. All Rights Reserved.