|
|||||||||
| 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.SetAttribute |
<static class> |
mozile.edit.Style |
| Field Summary | |
<static> Object |
_isHigherThan
Look-up table for comparing change types. |
<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.CommandGroup |
commands
A CommandGroup which will contain the global commands. |
<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> mozile.edit.CommandGroup |
defaults
A CommandGroup which will contain default commands. |
<static> Boolean |
editable
Indicates whether Mozile is currently allowed to edit the document. |
<static> mozile.edit.Command |
executionGroup
Used to execute a set of commands, with no action of its own. |
<static> mozile.edit.Command |
findText
Searches for text in the editor. |
<static> mozile.edit.Command |
indentList
Move the node before its next sibling. |
<static> Object |
insert
|
<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> Array |
marked
An array of all elements marked with setMark(). |
<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 |
moveNodeNext
Move the node before its next sibling. |
<static> mozile.edit.Command |
moveNodePrevious
Move the node before its previous sibling. |
<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> Object |
removeFormatting
|
<static> mozile.edit.Command |
removeNode
Removes a node from the document. |
<static> mozile.edit.Command |
removeText
Removes text from a node. |
<static> mozile.edit.Command |
replaceText
Replaces all occurrences of the target text with a replacement. |
<static> Boolean |
rich
Indicates the rich editing commands have been defined. |
<static> mozile.edit.Command |
save
Shows document source. |
<static> Object |
setAttribute
|
<static> mozile.edit.Command |
showHidden
Display |
<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> Object |
strings
Translations strings for the commands. |
<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. |
<static> Object |
unindentList
|
| Method Summary | |
<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> 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
|
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
|
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, <Object> localization)
Generate a Mozile command from an RNG Element. |
<static> Void
|
generateCommands(<mozile.rng.Schema> schema, <Object> localization)
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> State
|
getCurrentState(<Document> doc)
Sets the current state. |
<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> Array
|
getMarked(<String> key, <String> value)
Gets an array of all elements marked with matching key and value. |
<static> Element
|
getParentBlock(<Node> node)
Returns the node if it is a block, or the first ancestor which is a block. |
<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
|
isHigherPriority(<String> higher, <String> lower)
Compares two change types to determine if one is higher priority than the other. |
<static> Boolean
|
isTextEditable(<Node> node)
Checks a text 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> Boolean
|
mayContainText(<Node> node)
Checks a node to see if it may contain non-whitespace text. |
<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, <Object> localization)
Search through the children of the given node (following any references) for MES definitions. |
<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> Boolean
|
start()
Enables editing of the current document. |
<static> Boolean
|
stop()
Disables editing of the current document. |
<static> Void
|
updateClipboard()
Updates the local clipboard with data from the system clipboard, when possible. |
| Field Detail |
<static> Object _isHigherThan
<static> Object allCommands
<static> DocumentFragment clipboard
<static> mozile.edit.CommandGroup commands
<static> mozile.edit.Command copy
<static> mozile.edit.State currentState
<static> mozile.edit.Command cut
<static> mozile.edit.Command debug
<static> mozile.edit.CommandGroup defaults
<static> Boolean editable
<static> mozile.edit.Command executionGroup
<static> mozile.edit.Command findText
<static> mozile.edit.Command indentList
<static> Object insert
<static> mozile.edit.Command insertNode
<static> mozile.edit.Command insertText
<static> Object keyCodes
<static> Array marked
<static> mozile.edit.Command mergeNodes
<static> mozile.edit.Command moveNode
<static> mozile.edit.Command moveNodeNext
<static> mozile.edit.Command moveNodePrevious
<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> Object removeFormatting
<static> mozile.edit.Command removeNode
<static> mozile.edit.Command removeText
<static> mozile.edit.Command replaceText
<static> Boolean rich
<static> mozile.edit.Command save
<static> Object setAttribute
<static> mozile.edit.Command showHidden
<static> mozile.edit.Command source
<static> mozile.edit.Command splitNode
<static> mozile.edit.Command splitNodes
<static> Boolean status
<static> Object strings
<static> mozile.edit.Command test
<static> mozile.edit.Command tweak
<static> mozile.edit.Command undo
<static> Object unindentList
| Method Detail |
<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> 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 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 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, <Object> localization)
localization - Optional. The localization to use.
rng - The RNG element to generate commands for.
<static> Void generateCommands(<mozile.rng.Schema> schema, <Object> localization)
schema - The schema to generate commands for.
localization - Optional. The localization to use.
<static> mozile.edit.Command getCommand(<String> name)
name - The name of the command.
<static> Element getContainer(<Element> element)
element - The element to check.
<static> State getCurrentState(<Document> doc)
doc - Optional. The target document.
<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> Array getMarked(<String> key, <String> value)
key - The name of the property to set. Must be a valid JavaScript property name.
value - Optional. The value to check for. If non is given, any value is accepted.
<static> Element getParentBlock(<Node> node)
node -
<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 isHigherPriority(<String> higher, <String> lower)
higher - The first change type to test.
lower - The second change type to test.
<static> Boolean isTextEditable(<Node> node)
node - The node to check.
<static> mozile.rng.Element lookupRNG(<Node> node)
node - The node to find the RNG rule for.
<static> Boolean mayContainText(<Node> node)
node - The node to check.
<static> Object parseAccelerator(<String> accelerator)
accelerator - The accelerator string to check. See
<static> Void parseMES(<mozile.edit.Command> container, node, <Object> localization)
container - The Command object to attach new commands to.
localization - Optional. The localization to use.
<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> Boolean start()
<static> Boolean stop()
<static> Void updateClipboard()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||