org.xwiki.gwt.wysiwyg.client.plugin.text
Class TextPlugin

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractStatefulPlugin
          extended by org.xwiki.gwt.wysiwyg.client.plugin.text.TextPlugin
All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.KeyUpHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.shared.EventHandler, CommandListener, Updatable, Plugin

public class TextPlugin
extends org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractStatefulPlugin
implements com.google.gwt.event.dom.client.ClickHandler

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.

Version:
$Id: 7a3d2514500fc7dc9679fff0cfda66a04b193ce2 $

Constructor Summary
TextPlugin()
           
 
Method Summary
 void destroy()
          
 void init(RichTextArea textArea, Config config)
          
 void onClick(com.google.gwt.event.dom.client.ClickEvent event)
          
 void update()
          
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractStatefulPlugin
canUpdate, onBeforeCommand, onCommand, onKeyUp, onMouseUp, registerTextAreaHandlers
 
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
 

Constructor Detail

TextPlugin

public TextPlugin()
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.AbstractStatefulPlugin
See Also:
AbstractStatefulPlugin.destroy()

onClick

public void onClick(com.google.gwt.event.dom.client.ClickEvent event)

Specified by:
onClick in interface com.google.gwt.event.dom.client.ClickHandler
See Also:
ClickHandler.onClick(ClickEvent)

update

public void update()

Specified by:
update in interface Updatable
See Also:
Updatable.update()


Copyright © 2004-2013 XWiki. All Rights Reserved.