org.xwiki.gwt.wysiwyg.client.plugin.macro
Class MacroPlugin

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by org.xwiki.gwt.wysiwyg.client.plugin.macro.MacroPlugin
All Implemented Interfaces:
Plugin

public class MacroPlugin
extends org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin

WYSIWYG editor plug-in for inserting macros and for editing macro parameters.

Version:
$Id: a5b925fb83bb318244cfbc9ba7b56143dcc8dcbe $

Field Summary
static Command COLLAPSE
          Rich text area command for collapsing all the macros.
static Command EXPAND
          Rich text area command for expanding all the macros.
static Command INSERT
          Rich text area command for inserting a macro in place of the current selection.
static Command REFRESH
          Rich text area command for refreshing macro output.
 
Constructor Summary
MacroPlugin(MacroServiceAsync macroService)
          Creates a new macro plug-in that uses the specified macro service.
 
Method Summary
 void destroy()
          
 void edit()
          Start the edit macro wizard.
 MacroServiceAsync getMacroService()
           
 MacroSelector getSelector()
           
 void init(RichTextArea textArea, Config config)
          
 void insert()
          Start the insert macro wizard.
 void insert(String macroId)
          Skip the select macro wizard step and go directly to the edit macro wizard step for the specified macro.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
getConfig, getTextArea, getUIExtensionList, getUIExtensions, saveRegistration, saveRegistrations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFRESH

public static final Command REFRESH
Rich text area command for refreshing macro output.


COLLAPSE

public static final Command COLLAPSE
Rich text area command for collapsing all the macros.


EXPAND

public static final Command EXPAND
Rich text area command for expanding all the macros.


INSERT

public static final Command INSERT
Rich text area command for inserting a macro in place of the current selection.

Constructor Detail

MacroPlugin

public MacroPlugin(MacroServiceAsync macroService)
Creates a new macro plug-in that uses the specified macro service.

Parameters:
macroService - the macro service to be used for retrieving the macro descriptors
Method Detail

init

public void init(RichTextArea textArea,
                 Config config)

Specified by:
init in interface Plugin
Overrides:
init in class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
See Also:
AbstractPlugin.init(RichTextArea, Config)

destroy

public void destroy()

Specified by:
destroy in interface Plugin
Overrides:
destroy in class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
See Also:
AbstractPlugin.destroy()

getSelector

public MacroSelector getSelector()
Returns:
the macro selector

getMacroService

public MacroServiceAsync getMacroService()
Returns:
the service used to retrieve the macro descriptors

edit

public void edit()
Start the edit macro wizard.


insert

public void insert()
Start the insert macro wizard.


insert

public void insert(String macroId)
Skip the select macro wizard step and go directly to the edit macro wizard step for the specified macro.

Parameters:
macroId - a macro identifier


Copyright © 2004–2015 XWiki. All rights reserved.