com.xpn.xwiki.wysiwyg.server.plugin
Class WysiwygPluginApi

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.wysiwyg.server.plugin.WysiwygPluginApi

public class WysiwygPluginApi
extends com.xpn.xwiki.api.Api

Api for the WysiwygPlugin.

Version:
$Id: WysiwygPluginApi.java 27662 2010-03-16 17:30:45Z mflorea $

Field Summary
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
WysiwygPluginApi(WysiwygPlugin plugin, com.xpn.xwiki.XWikiContext context)
          Creates a new API instance for the given plug-in in the specified context.
 
Method Summary
 WysiwygPlugin getPlugin()
           
 boolean isSyntaxSupported(java.lang.String syntaxId)
          Checks if there is a parser and a renderer available for 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.
 void setPlugin(WysiwygPlugin plugin)
           
 
Methods inherited from class com.xpn.xwiki.api.Api
checkProgrammingRights, convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WysiwygPluginApi

public WysiwygPluginApi(WysiwygPlugin plugin,
                        com.xpn.xwiki.XWikiContext context)
Creates a new API instance for the given plug-in in the specified context.

Parameters:
plugin - The underlying plug-in of this plug-in API.
context - The XWiki context.
Method Detail

getPlugin

public WysiwygPlugin getPlugin()
Returns:
The underlying plug-in of this plug-in API.
See Also:
plugin

setPlugin

public void setPlugin(WysiwygPlugin plugin)
Parameters:
plugin - The underlying plug-in of this plug-in API.
See Also:
plugin

isSyntaxSupported

public boolean isSyntaxSupported(java.lang.String syntaxId)
Checks if there is a parser and a renderer available for the specified syntax.

Parameters:
syntaxId - the syntax identifier, like xwiki/2.0
Returns:
true if the specified syntax is currently supported by the editor, false otherwise

parseAndRender

public 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 rendered
syntax - the storage syntax
Returns:
the XHTML result of rendering the given HTML fragment


Copyright © 2004-2010 XWiki. All Rights Reserved.