Package org.xwiki.wysiwyg.converter
Interface HTMLConverter
-
@Role public interface HTMLConverter
Converts HTML to/from a specified syntax.- Version:
- $Id: 1242cdc148c77c1c6e71b237057b01e1a4894611 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description String
fromHTML(String html, String syntaxId)
Cleans and converts the given HTML fragment to the specified syntax.String
parseAndRender(String html, String syntax)
Deprecated.since 11.9RC1, useparseAndRender(String, Syntax, EntityReference)
insteaddefault String
parseAndRender(String html, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference)
Parses the given HTML fragment and renders the result in annotated XHTML syntax.default String
parseAndRender(String html, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference, boolean restricted)
Parses the given HTML fragment and renders the result in annotated XHTML syntax.String
toHTML(String source, String syntaxId)
Deprecated.since 11.9RC1, usetoHTML(String, Syntax, EntityReference)
insteaddefault String
toHTML(String source, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference)
Converts the given source text from the specified syntax to HTML.default String
toHTML(String source, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference, boolean restricted)
Converts the given source text from the specified syntax to HTML.
-
-
-
Method Detail
-
toHTML
@Deprecated String toHTML(String source, String syntaxId)
Deprecated.since 11.9RC1, usetoHTML(String, Syntax, EntityReference)
insteadConverts the given source text from the specified syntax to HTML.- Parameters:
source
- the text to be convertedsyntaxId
- the syntax of the source- Returns:
- the HTML result of the conversion
-
toHTML
default String toHTML(String source, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference)
Converts the given source text from the specified syntax to HTML.- Parameters:
source
- the text to be convertedsyntax
- the syntax of the sourcesourceReference
- the reference of the source- Returns:
- the HTML result of the conversion
- Since:
- 11.9RC1
-
toHTML
@Unstable default String toHTML(String source, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference, boolean restricted)
Converts the given source text from the specified syntax to HTML.- Parameters:
source
- the text to be convertedsyntax
- the syntax of the sourcesourceReference
- the reference of the sourcerestricted
- true if the content of this property should be executed in a restricted content, false otherwise- Returns:
- the HTML result of the conversion
- Since:
- 14.10, 14.4.7, 13.10.11
-
fromHTML
String fromHTML(String html, String syntaxId)
Cleans and converts the given HTML fragment to the specified syntax.- Parameters:
html
- the HTML text to be convertedsyntaxId
- the syntax identifier- Returns:
- the result on the conversion
-
parseAndRender
@Deprecated String parseAndRender(String html, String syntax)
Deprecated.since 11.9RC1, useparseAndRender(String, Syntax, EntityReference)
insteadParses the given HTML fragment and renders the result in annotated XHTML syntax.- Parameters:
html
- the HTML fragment to be parsed and renderedsyntax
- the storage syntax- Returns:
- the XHTML result of rendering the given HTML fragment
-
parseAndRender
default String parseAndRender(String html, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference)
Parses the given HTML fragment and renders the result in annotated XHTML syntax.- Parameters:
html
- the HTML fragment to be parsed and renderedsyntax
- the storage syntaxsourceReference
- the reference of the html (where it's coming from)- Returns:
- the XHTML result of rendering the given HTML fragment
- Since:
- 11.9RC1
-
parseAndRender
@Unstable default String parseAndRender(String html, org.xwiki.rendering.syntax.Syntax syntax, EntityReference sourceReference, boolean restricted)
Parses the given HTML fragment and renders the result in annotated XHTML syntax.- Parameters:
html
- the HTML fragment to be parsed and renderedsyntax
- the storage syntaxsourceReference
- the reference of the html (where it's coming from)restricted
- true if the content of this property should be executed in a restricted content, false otherwise- Returns:
- the XHTML result of rendering the given HTML fragment
- Since:
- 14.10, 14.4.7, 13.10.11
-
-