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

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

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

Converts HTML to/from a specified syntax.

Version:
$Id: 42d162326d289339bcee3fc2f301e423105edb87 $

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

Method Detail

toHTML

String toHTML(String source,
              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

String fromHTML(String html,
                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

String parseAndRender(String html,
                      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-2013 XWiki. All Rights Reserved.