com.xpn.xwiki.wysiwyg.client.plugin.text
Class TextPlugin
java.lang.Object
com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
com.xpn.xwiki.wysiwyg.client.plugin.internal.StatefulPlugin
com.xpn.xwiki.wysiwyg.client.plugin.text.TextPlugin
- All Implemented Interfaces:
- com.google.gwt.user.client.ui.ClickListener, com.google.gwt.user.client.ui.KeyboardListener, Plugin, CommandListener, DeferredUpdate, java.util.EventListener
public class TextPlugin
- extends StatefulPlugin
XRichTextEditor plug-in for making text bold, italic, underline or strike through. It installs four toggle
buttons on the tool bar and updates their status depending on the current cursor position and the direction of the
navigation using the arrow keys. For instance, if you navigate from a bold region to an italic one and you type a
character it will be bold.
Known issues: When you navigate backwards, from right to left, using the
arrow keys, the status of the toggle buttons is not synchronized with the text area. The text area behaves properly
though.
| Fields inherited from interface com.google.gwt.user.client.ui.KeyboardListener |
KEY_ALT, KEY_BACKSPACE, KEY_CTRL, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ENTER, KEY_ESCAPE, KEY_HOME, KEY_LEFT, KEY_PAGEDOWN, KEY_PAGEUP, KEY_RIGHT, KEY_SHIFT, KEY_TAB, KEY_UP, MODIFIER_ALT, MODIFIER_CTRL, MODIFIER_META, MODIFIER_SHIFT |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextPlugin
public TextPlugin()
init
public void init(Wysiwyg wysiwyg,
XRichTextArea textArea,
Config config)
- Initialize the plug-in. Plug-ins need to know the text area in order to provide only those feature that are
supported.
- Specified by:
init in interface Plugin- Overrides:
init in class AbstractPlugin
- Parameters:
wysiwyg - The WYSIWYG application context.textArea - The text area of the editor.config - The configuration.- See Also:
AbstractPlugin.init(Wysiwyg, XRichTextArea, Config)
destroy
public void destroy()
- Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.
- Specified by:
destroy in interface Plugin- Overrides:
destroy in class AbstractPlugin
- See Also:
AbstractPlugin.destroy()
onClick
public void onClick(com.google.gwt.user.client.ui.Widget sender)
-
- Specified by:
onClick in interface com.google.gwt.user.client.ui.ClickListener- Overrides:
onClick in class StatefulPlugin
- See Also:
ClickListener.onClick(Widget)
onKeyUp
public void onKeyUp(com.google.gwt.user.client.ui.Widget sender,
char keyCode,
int modifiers)
-
- Specified by:
onKeyUp in interface com.google.gwt.user.client.ui.KeyboardListener- Overrides:
onKeyUp in class StatefulPlugin
- See Also:
KeyboardListener.onKeyUp(Widget, char, int)
onBold
public void onBold()
onItalic
public void onItalic()
onUnderline
public void onUnderline()
onStrikeThrough
public void onStrikeThrough()
onTeletype
public void onTeletype()
onUpdate
public void onUpdate()
- Executes the most recent update.
- See Also:
DeferredUpdate.onUpdate()
Copyright © 2004-2008 XWiki. All Rights Reserved.