public class RichTextEditorController extends Object implements Updatable, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.KeyUpHandler, CommandListener, com.google.gwt.event.dom.client.LoadHandler
RichTextEditor controller.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PLUGINS
The list of plugins this controller will attempt to load by default if the configuration doesn't specify which
plugins to load.
|
static String |
DEFAULT_ROOT_UI_EXTENSIONS
The list of default extensions for the
rootUI extension point. |
| Constructor and Description |
|---|
RichTextEditorController(RichTextEditor richTextEditor,
Config config,
PluginFactoryManager pfm,
SyntaxValidator syntaxValidator)
Creates a new editor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUpdate() |
void |
destroy()
Destroys this editor, unregistering all the listeners and releasing the used memory.
|
protected void |
extendRootUI()
Loads the root user interface extensions.
|
Config |
getConfigurationSource() |
RichTextEditor |
getRichTextEditor()
Get the rich text editor.
|
protected void |
loadPlugins()
Loads the plugins specified in the configuration.
|
protected void |
maybeInitialize()
Initialize the rich text editor if it wasn't already initialized.
|
boolean |
onBeforeCommand(CommandManager sender,
Command command,
String param) |
void |
onCommand(CommandManager sender,
Command command,
String param) |
void |
onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event) |
void |
onLoad(com.google.gwt.event.dom.client.LoadEvent event) |
void |
onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event) |
protected void |
saveRegistration(com.google.gwt.event.shared.HandlerRegistration registration)
Saves a handler registration in order for the handler to be automatically removed when the plug-in is destroyed.
|
void |
update() |
public static final String DEFAULT_PLUGINS
public static final String DEFAULT_ROOT_UI_EXTENSIONS
rootUI extension point.public RichTextEditorController(RichTextEditor richTextEditor, Config config, PluginFactoryManager pfm, SyntaxValidator syntaxValidator)
richTextEditor - the rich text editor to manageconfig - the configuration sourcepfm - the plugin factory manager used to instantiate pluginssyntaxValidator - the object used to assert if a feature must be enabled or disabled in some contextpublic void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
onMouseUp in interface com.google.gwt.event.dom.client.MouseUpHandlerpublic void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event)
onKeyUp in interface com.google.gwt.event.dom.client.KeyUpHandlerpublic boolean onBeforeCommand(CommandManager sender, Command command, String param)
onBeforeCommand in interface CommandListenerpublic void onCommand(CommandManager sender, Command command, String param)
onCommand in interface CommandListenerpublic void onLoad(com.google.gwt.event.dom.client.LoadEvent event)
onLoad in interface com.google.gwt.event.dom.client.LoadHandlerprotected void maybeInitialize()
protected void loadPlugins()
protected void extendRootUI()
public RichTextEditor getRichTextEditor()
public Config getConfigurationSource()
protected void saveRegistration(com.google.gwt.event.shared.HandlerRegistration registration)
registration - the handler registration to be savedpublic void destroy()
Copyright © 2004–2016 XWiki. All rights reserved.