org.xwiki.gwt.wysiwyg.client.converter
Interface HTMLConverter

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService

@ComponentRole
@RemoteServiceRelativePath(value="HTMLConverter.gwtrpc")
public interface HTMLConverter
extends com.google.gwt.user.client.rpc.RemoteService

Converts HTML to/from a specified syntax.

Version:
$Id: HTMLConverter.java 32975 2010-11-19 10:09:01Z vmassol $

Method Summary
 java.lang.String fromHTML(java.lang.String html, java.lang.String syntaxId)
          Cleans and converts the given HTML fragment to the specified syntax.
 java.lang.String parseAndRender(java.lang.String html, java.lang.String syntax)
          Parses the given HTML fragment and renders the result in annotated XHTML syntax.
 java.lang.String toHTML(java.lang.String source, java.lang.String syntaxId)
          Converts the given source text from the specified syntax to HTML.
 

Method Detail

toHTML

java.lang.String toHTML(java.lang.String source,
                        java.lang.String syntaxId)
Converts the given source text from the specified syntax to HTML.

Parameters:
source - the text to be converted
syntaxId - the syntax identifier
Returns:
the HTML result of the conversion

fromHTML

java.lang.String fromHTML(java.lang.String html,
                          java.lang.String syntaxId)
Cleans and converts the given HTML fragment to the specified syntax.

Parameters:
html - the HTML text to be converted
syntaxId - the syntax identifier
Returns:
the result on the conversion

parseAndRender

java.lang.String parseAndRender(java.lang.String html,
                                java.lang.String syntax)
Parses the given HTML fragment and renders the result in annotated XHTML syntax.

Parameters:
html - the HTML fragment to be parsed and rendered
syntax - the storage syntax
Returns:
the XHTML result of rendering the given HTML fragment


Copyright © 2004-2011 XWiki. All Rights Reserved.