enterhandler.js
No description.

File Location

/goog/editor/plugins/enterhandler.js

Classes

goog.editor.plugins.EnterHandler
Plugin to handle enter keys. This does all the crazy to normalize (as much as is reasonable) what happens when you hit enter. This also handles the special casing of hitting enter in a blockquote. In IE, Webkit, and Opera, the resulting HTML uses one DIV tag per line. In Firefox, the resulting HTML uses BR tags at the end of each line.

Public Protected Private

Global Functions

goog.editor.plugins.EnterHandler.deleteW3cRange_(range) goog.dom.AbstractRange
Deletes the contents of the selection from the DOM.
Arguments:
range : goog.dom.AbstractRange
The range to remove contents from.
Returns: goog.dom.AbstractRange  The resulting range. Used for testing.
code »
goog.editor.plugins.EnterHandler.isBrElem(node) boolean
Whether this is a node that contains a single BR tag and non-nbsp whitespace.
Arguments:
node : Node
Node to check.
Returns: boolean  Whether this is an element that only contains a BR.
code »
goog.editor.plugins.EnterHandler.isDirectlyInBlockquote(n) boolean
Determines whether the lowest containing block node is a blockquote.
Arguments:
n : Node
The node.
Returns: boolean  Whether the deepest block ancestor of n is a blockquote.
code »
goog.editor.plugins.EnterHandler.isInOneContainerW3c_(range) boolean
Checks whether the whole range is in a single block-level element.
Arguments:
range : goog.dom.AbstractRange
The range to check.
Returns: boolean  Whether the whole range is in a single block-level element.
code »
goog.editor.plugins.EnterHandler.isPartialEndW3c_(range) boolean
Checks whether the end of the range is not at the end of a block-level element.
Arguments:
range : goog.dom.AbstractRange
The range to check.
Returns: boolean  Whether the end of the range is not at the end of a block-level element.
code »

Directory plugins

File Reference