|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--mozile.Module | +--mozile.edit
Nested Class Summary | |
<static class> |
mozile.edit.State |
<static class> |
mozile.edit.Command |
<static class> |
mozile.edit.CommandGroup |
<static class> |
mozile.edit.Navigate |
<static class> |
mozile.edit.InsertionPoint |
<static class> |
mozile.edit.Split |
<static class> |
mozile.edit.Insert |
<static class> |
mozile.edit.Wrap |
<static class> |
mozile.edit.Unwrap |
<static class> |
mozile.edit.Replace |
<static class> |
mozile.edit.Style |
Field Summary | |
<static> Object |
allCommands
An associative array of all the Command objects (including subclasses) in this document. |
<static> DocumentFragment |
clipboard
The local clipboard. |
<static> mozile.edit.Command |
copy
Copies the current selection to the clipboard. |
<static> mozile.edit.State |
currentState
The current state. |
<static> mozile.edit.Command |
cut
Copies the current selection to the clipboard, then removes it. |
<static> mozile.edit.Command |
debug
Shows debugging information. |
<static> Boolean |
editable
Indicates whether Mozile is currently allowed to edit the document. |
<static> mozile.edit.Command |
insertNode
Removes a node from the document. |
<static> mozile.edit.Command |
insertText
Inserts text into a text node. |
<static> Object |
keyCodes
An associative array of keyCodes and their standard names. |
<static> mozile.edit.Command |
mergeNodes
Merges two nodes, appending the children of the second node to the first node. |
<static> mozile.edit.Command |
moveNode
Moves a node from one location in the document to another. |
<static> mozile.edit.Command |
navigateLeftRight
Inserts text into a text node. |
<static> Integer |
NEXT
Flag for editing direction. |
<static> mozile.edit.Command |
paste
Copies the current selection to the clipboard. |
<static> Integer |
PREVIOUS
Flag for editing direction. |
<static> mozile.edit.Command |
redo
Executes the current command in the global undo stack. |
<static> mozile.edit.Command |
remove
Removes text and nodes from a range. |
<static> mozile.edit.Command |
removeNode
Removes a node from the document. |
<static> mozile.edit.Command |
removeText
Removes text from a node. |
<static> Boolean |
rich
Indicates the rich editing commands have been defined. |
<static> mozile.edit.Command |
save
Shows document source. |
<static> mozile.edit.Command |
source
Shows document source. |
<static> mozile.edit.Command |
splitNode
Splits a node by cloning it, inserting the clone after the original, and moving all the original's children after the cursor into the clone. |
<static> mozile.edit.Command |
splitNodes
Splits mutliple nodes. |
<static> Boolean |
status
Indicates Mozile's current editing status. |
<static> mozile.edit.Command |
test
A command used for testing purposes only. |
<static> mozile.edit.Command |
tweak
A tweaking command. |
<static> mozile.edit.Command |
undo
Reverses the action of the last command in the global undo stack. |
Method Summary | |
<static> mozile.edit.Command
|
addCommand(<mozile.edit.Command> command)
Adds a command to the list of global commands for this document. |
<static> mozile.edit.Command
|
addDefaultCommand(<mozile.edit.Command> command)
Adds a command to the list default commands for this document. |
<static> Boolean
|
checkAccelerator(<Event> event, <String> accelerator)
Check an event against an "accelerator" string (i.e. |
<static> Boolean
|
checkAccelerators(<Event> event, accelerators)
Check an event against an array of "accelerator" strings (i.e. |
<static> Number
|
compareCommands(<mozile.edit.Command> command1, <mozile.edit.Command> command2)
Compares a pair commands by their "priority" attribute. |
<static> Boolean
|
containsEmptyToken(<Node> node, <Integer> offset)
Determines whether a text node ends with an empty token instance. |
<static> String
|
convertKeyCode(<Integer> keyCode)
Converts a key code to a key name. |
<static> Text
|
createEmptyToken()
Creates an empty token node. |
<static> Void
|
disable()
Disables editing of the current document. |
<static> Void
|
done(<mozile.edit.State> state)
Records the result of a command in such a way that it can be undone. |
<static> Void
|
dumpUndoStack()
Displays the contents of the undo stack. |
<static> Void
|
enable()
Enables editing of the current document. |
<static> Void
|
extendRNG()
Add command functionality to the RNG system. |
<static> Element
|
followMESRef(<Element> element)
Follow an MES reference and return an MES define element. |
<static> String
|
generateAccelerator(<Event> event)
Takes an event and returns a representation of the event as an accelerator string. |
<static> mozile.rng.Command
|
generateCommand(node)
Generate a Mozile command from an RNG Element. |
<static> Void
|
generateCommands(<mozile.rng.Schema> schema)
For each RNG Element in the given schema, add all of the appropriate commands. |
<static> mozile.edit.Command
|
getCommand(<String> name)
Gets a command from the list of all commands. |
<static> Element
|
getContainer(<Element> element)
Searches for an ancestor which mas been marked by Mozile as editable. |
<static> mozile.edit.InsertionPoint
|
getInsertionPoint(<Node> node, <Integer> direction, <Boolean> force)
Get the first insertion point in the given node and the given direction. |
<static> Object
|
getMark(<Element> element, <String> key)
Gets a property of a special "mozile" object belonging to an element. |
<static> Element
|
getParentBlock(<Node> node)
Returns the node if it is a block, or the first ancestor which is a block. |
<static> mozile.edit.State
|
handleDefault(event)
Takes an event object and uses it to try and trigger all of the document-wide default commands in the mozile.edit._defaultCommands array. |
<static> mozile.edit.State
|
handleEvent(event)
Takes an event object and uses it to try and trigger all of the document-wide commands in the mozile.edit._commands array. |
<static> Boolean
|
isBlock(<Node> node)
A temporary hack to check whether a node is a block level element or not. |
<static> Boolean
|
isChildless(<Node> node)
A temporary hack to check whether a node can have child nodes. |
<static> Boolean
|
isEditable(<Node> node)
Detect whether this node is inside an editable container element. |
<static> Boolean
|
isEditableElement(<Element> element)
Determines whether this element has been marked as editable by Mozile. |
<static> Boolean
|
isEmpty(<Node> node)
Determines whether a node is empty: it contains no non-white-space text and no empty tokens inside any of its children. |
<static> Boolean
|
isEmptyToken(<Node> node)
Determines whether a node is an "empty token" instance. |
<static> Boolean
|
isNodeEditable(<Node> node)
Checks a node to see if it is editable. |
<static> mozile.rng.Element
|
lookupRNG(<Node> node)
Gets the mozile.rng.Element object which corresponds to the given element. |
<static> Object
|
parseAccelerator(<String> accelerator)
Takes an accelerator string and returns an object with easy-to-use properties. |
<static> Void
|
parseMES(<mozile.edit.Command> container, node)
Search through the children of the given node (following any references) for MES definitions. |
<static> Void
|
setCurrentState()
Sets the current state. |
<static> Object
|
setMark(<Element> element, <String> key, value)
Sets a property of a special "mozile" object for an element, which stores data for Mozile to use. |
<static> Boolean
|
setStatus(<Boolean> status)
Sets the editing status for the document. |
<static> Array
|
splitAccelerators(<String> accelerators)
Splits a space-separated list of accelerator strings, and cleans them. |
<static> Void
|
start()
Starts editing the current document. |
<static> Void
|
stop()
Stops editing the current document. |
<static> Void
|
updateClipboard()
Updates the local clipboard with data from the system clipboard, when possible. |
Field Detail |
<static> Object allCommands
<static> DocumentFragment clipboard
<static> mozile.edit.Command copy
<static> mozile.edit.State currentState
<static> mozile.edit.Command cut
<static> mozile.edit.Command debug
<static> Boolean editable
<static> mozile.edit.Command insertNode
<static> mozile.edit.Command insertText
<static> Object keyCodes
<static> mozile.edit.Command mergeNodes
<static> mozile.edit.Command moveNode
<static> mozile.edit.Command navigateLeftRight
<static> Integer NEXT
<static> mozile.edit.Command paste
<static> Integer PREVIOUS
<static> mozile.edit.Command redo
<static> mozile.edit.Command remove
<static> mozile.edit.Command removeNode
<static> mozile.edit.Command removeText
<static> Boolean rich
<static> mozile.edit.Command save
<static> mozile.edit.Command source
<static> mozile.edit.Command splitNode
<static> mozile.edit.Command splitNodes
<static> Boolean status
<static> mozile.edit.Command test
<static> mozile.edit.Command tweak
<static> mozile.edit.Command undo
Method Detail |
<static> mozile.edit.Command addCommand(<mozile.edit.Command> command)
command
- The command to be added.
<static> mozile.edit.Command addDefaultCommand(<mozile.edit.Command> command)
command
- The command to be added.
<static> Boolean checkAccelerator(<Event> event, <String> accelerator)
Note: The sequence is important. The order must be "Command-Meta-Control-Alt-Shift-UpperCaseCharacter". (Comparison is done using lower case. Not all combinations will work on all platforms.)
event
- The event to check.
accelerator
- A string denoting the key combination(s).
<static> Boolean checkAccelerators(<Event> event, accelerators)
event
- The event to check.
accelerator
- An array of strings denoting the key combination(s).
<static> Number compareCommands(<mozile.edit.Command> command1, <mozile.edit.Command> command2)
command1
-
command2
-
<static> Boolean containsEmptyToken(<Node> node, <Integer> offset)
node
- The text node to check.
offset
- Optional. An offset within the text node. The method will look for an empty token immediately after this offset. If none is given, the method searches for any empty token.
<static> String convertKeyCode(<Integer> keyCode)
keyCode
- The key code to convert.
<static> Text createEmptyToken()
<static> Void disable()
<static> Void done(<mozile.edit.State> state)
state
- The state to record. Expected to be the result of a Command's execute method.
<static> Void dumpUndoStack()
<static> Void enable()
<static> Void extendRNG()
<static> Element followMESRef(<Element> element)
element
- The "ref" element to follow.
<static> String generateAccelerator(<Event> event)
event
- The event to generate the accelerator from.
<static> mozile.rng.Command generateCommand(node)
rng
- The RNG element to generate commands for.
<static> Void generateCommands(<mozile.rng.Schema> schema)
schema
- The schema to generate commands for.
<static> mozile.edit.Command getCommand(<String> name)
name
- The name of the command.
<static> Element getContainer(<Element> element)
element
- The element to check.
<static> mozile.edit.InsertionPoint getInsertionPoint(<Node> node, <Integer> direction, <Boolean> force)
node
- The node to search for an insertion point.
direction
- A coded integer. Can be NEXT (1) or PREVIOUS (-1).
force
- Optional. When true the fact that the given node is not editable is ignored.
<static> Object getMark(<Element> element, <String> key)
element
- The element to get check.
key
- The name of the property to set. Must be a valid JavaScript property name.
<static> Element getParentBlock(<Node> node)
node
-
<static> mozile.edit.State handleDefault(event)
command
- The command to be added.
<static> mozile.edit.State handleEvent(event)
command
- The command to be added.
<static> Boolean isBlock(<Node> node)
node
-
<static> Boolean isChildless(<Node> node)
node
-
<static> Boolean isEditable(<Node> node)
node
- The node to check.
<static> Boolean isEditableElement(<Element> element)
element
- The element to check.
<static> Boolean isEmpty(<Node> node)
node
- The node to check.
<static> Boolean isEmptyToken(<Node> node)
node
- The text node to check.
<static> Boolean isNodeEditable(<Node> node)
node
- The node to check.
<static> mozile.rng.Element lookupRNG(<Node> node)
node
- The node to find the RNG rule for.
<static> Object parseAccelerator(<String> accelerator)
accelerator
- The accelerator string to check. See
<static> Void parseMES(<mozile.edit.Command> container, node)
container
- The Command object to attach new commands to.
<static> Void setCurrentState()
<static> Object setMark(<Element> element, <String> key, value)
element
- The element to mark.
key
- The name of the property to set. Must be a valid JavaScript property name.
value
- The value for the new property.
<static> Boolean setStatus(<Boolean> status)
status
- The desired editing status.
<static> Array splitAccelerators(<String> accelerators)
accelerators
- A space-separated list of accelerators.
<static> Void start()
<static> Void stop()
<static> Void updateClipboard()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |