org.xwiki.gwt.wysiwyg.client.plugin.line
Class IELinePlugin

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin
          extended by org.xwiki.gwt.wysiwyg.client.plugin.line.IELinePlugin
All Implemented Interfaces:
InnerHTMLListener, CommandListener, Plugin

public class IELinePlugin
extends LinePlugin
implements InnerHTMLListener

Internet Explorer specific implementation of the LinePlugin.


Field Summary
 
Fields inherited from class org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin
BR, CLASS_NAME, domUtils, LI, LINE_BREAK, RESET, SPACER, SUBMIT, TD, TH
 
Constructor Summary
IELinePlugin()
           
 
Method Summary
 void destroy()
          Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.
protected  void ensureLineBreakIsVisible(com.google.gwt.dom.client.Node lineBreak, com.google.gwt.dom.client.Node container)
          Ensures that the line created by inserting a line break is visible.
 void init(RichTextArea textArea, Config config)
          Initialize the plug-in.
protected  void insertEmptyLine(com.google.gwt.dom.client.Node container, Range caret)
          Inserts an empty line before the block containing the caret.
 void onInnerHTMLChange(Element element)
          Called whenever the innerHTML property, of an element within the document this listener has been registered to, changes.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin
adjustLineBreak, copyLineStyle, handleRepeatableKey, insertLineBreak, isAfterLineBreak, isAtStart, isEmptyLine, isLineBreak, markInitialLineBreaks, markSpacers, needsSpace, onBackspace, onBeforeCommand, onCommand, onEnter, onEnterParagraph, onReset, replaceEmptyLinesWithParagraphs, splitLine, unMarkSpacers
 
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

IELinePlugin

public IELinePlugin()
Method Detail

init

public void init(RichTextArea 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 LinePlugin
Parameters:
textArea - the text area of the editor
config - the configuration object
See Also:
LinePlugin.init(RichTextArea, 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 LinePlugin
See Also:
LinePlugin.destroy()

insertEmptyLine

protected void insertEmptyLine(com.google.gwt.dom.client.Node container,
                               Range caret)
Inserts an empty line before the block containing the caret. This is useful when the caret is at the beginning of a block and we want to move that block down by one line; by pressing Enter we can do that.
If the caret is inside an empty block level container and we insert an empty line before then the caret doesn't remain in its place. We have to reset the caret.

Overrides:
insertEmptyLine in class LinePlugin
Parameters:
container - a block-level element containing the caret
caret - the place where to insert the empty line
See Also:
LinePlugin.insertEmptyLine(Node, Range)

onInnerHTMLChange

public void onInnerHTMLChange(Element element)
Called whenever the innerHTML property, of an element within the document this listener has been registered to, changes.

Specified by:
onInnerHTMLChange in interface InnerHTMLListener
Parameters:
element - The element whose innerHTML has changed.
See Also:
InnerHTMLListener.onInnerHTMLChange(Element)

ensureLineBreakIsVisible

protected void ensureLineBreakIsVisible(com.google.gwt.dom.client.Node lineBreak,
                                        com.google.gwt.dom.client.Node container)
Description copied from class: LinePlugin
Ensures that the line created by inserting a line break is visible. This is need especially when the line break is inserted at the end of an existing line because most browsers don't allow the caret to be placed on invisible lines.

Overrides:
ensureLineBreakIsVisible in class LinePlugin
Parameters:
lineBreak - the line break that was inserted
container - the container (e.g. the paragraph) where the line break was inserted