com.xpn.xwiki.wysiwyg.client.plugin.line
Class MozillaLinePlugin

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by com.xpn.xwiki.wysiwyg.client.plugin.line.LinePlugin
          extended by com.xpn.xwiki.wysiwyg.client.plugin.line.MozillaLinePlugin
All Implemented Interfaces:
com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.KeyUpHandler, com.google.gwt.event.shared.EventHandler, Plugin, CommandListener

public class MozillaLinePlugin
extends LinePlugin

Mozilla specific implementation of the LinePlugin.

Version:
$Id: MozillaLinePlugin.java 24533 2009-10-16 14:42:07Z mflorea $

Field Summary
 
Fields inherited from class com.xpn.xwiki.wysiwyg.client.plugin.line.LinePlugin
BR, CLASS_NAME, domUtils, LI, LINE_BREAK, RESET, SPACER, SUBMIT, TD, TH
 
Constructor Summary
MozillaLinePlugin()
           
 
Method Summary
protected  void insertLineBreak(com.google.gwt.dom.client.Node container, Range caret)
          Inserts a line break at the specified position in the document.
We overwrite in order to fix a Mozilla bug which causes the caret to be rendered on the same line after you press Enter, if the new line doesn't have any visible contents.
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.plugin.line.LinePlugin
adjustLineBreak, copyLineStyle, destroy, handleRepeatableKey, init, insertEmptyLine, isAfterLineBreak, isAtStart, isEmptyLine, isLineBreak, markInitialLineBreaks, markSpacers, needsSpace, onBackspace, onBeforeCommand, onCommand, onEnter, onEnterParagraph, onKeyDown, onKeyPress, onKeyUp, onReset, replaceEmptyLinesWithParagraphs, splitLine, unMarkSpacers
 
Methods inherited from class com.xpn.xwiki.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

MozillaLinePlugin

public MozillaLinePlugin()
Method Detail

insertLineBreak

protected void insertLineBreak(com.google.gwt.dom.client.Node container,
                               Range caret)
Inserts a line break at the specified position in the document.
We overwrite in order to fix a Mozilla bug which causes the caret to be rendered on the same line after you press Enter, if the new line doesn't have any visible contents. Once you start typing the caret moves below, but it looks strange before you type. We fixed the bug by adding a BR at the end of the new line.

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


Copyright © 2004-2010 XWiki. All Rights Reserved.