Class mozile.edit

Object
   |
   +--mozile.Module
         |
         +--mozile.edit

class mozile.edit
extends mozile.Module

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

_isHigherThan

<static> Object _isHigherThan

allCommands

<static> Object allCommands

clipboard

<static> DocumentFragment clipboard

commands

<static> mozile.edit.CommandGroup commands

copy

<static> mozile.edit.Command copy

currentState

<static> mozile.edit.State currentState

cut

<static> mozile.edit.Command cut

debug

<static> mozile.edit.Command debug

defaults

<static> mozile.edit.CommandGroup defaults

editable

<static> Boolean editable

executionGroup

<static> mozile.edit.Command executionGroup

findText

<static> mozile.edit.Command findText

indentList

<static> mozile.edit.Command indentList

insert

<static> Object insert

insertNode

<static> mozile.edit.Command insertNode

insertText

<static> mozile.edit.Command insertText

keyCodes

<static> Object keyCodes

marked

<static> Array marked

mergeNodes

<static> mozile.edit.Command mergeNodes

moveNode

<static> mozile.edit.Command moveNode

moveNodeNext

<static> mozile.edit.Command moveNodeNext

moveNodePrevious

<static> mozile.edit.Command moveNodePrevious

navigateLeftRight

<static> mozile.edit.Command navigateLeftRight

NEXT

<static> Integer NEXT

paste

<static> mozile.edit.Command paste

PREVIOUS

<static> Integer PREVIOUS

redo

<static> mozile.edit.Command redo

remove

<static> mozile.edit.Command remove

removeFormatting

<static> Object removeFormatting

removeNode

<static> mozile.edit.Command removeNode

removeText

<static> mozile.edit.Command removeText

replaceText

<static> mozile.edit.Command replaceText

rich

<static> Boolean rich

save

<static> mozile.edit.Command save

setAttribute

<static> Object setAttribute

showHidden

<static> mozile.edit.Command showHidden

source

<static> mozile.edit.Command source

splitNode

<static> mozile.edit.Command splitNode

splitNodes

<static> mozile.edit.Command splitNodes

status

<static> Boolean status

strings

<static> Object strings

test

<static> mozile.edit.Command test

tweak

<static> mozile.edit.Command tweak

undo

<static> mozile.edit.Command undo

unindentList

<static> Object unindentList


Method Detail

checkAccelerator

<static> Boolean checkAccelerator(<Event> event, <String> accelerator)

checkAccelerators

<static> Boolean checkAccelerators(<Event> event, accelerators)

containsEmptyToken

<static> Boolean containsEmptyToken(<Node> node, <Integer> offset)

convertKeyCode

<static> String convertKeyCode(<Integer> keyCode)

createEmptyToken

<static> Text createEmptyToken()

done

<static> Void done(<mozile.edit.State> state)

dumpUndoStack

<static> Void dumpUndoStack()

extendRNG

<static> Void extendRNG()

followMESRef

<static> Element followMESRef(<Element> element)

generateAccelerator

<static> String generateAccelerator(<Event> event)

generateCommand

<static> mozile.rng.Command generateCommand(node, <Object> localization)

generateCommands

<static> Void generateCommands(<mozile.rng.Schema> schema, <Object> localization)

getCommand

<static> mozile.edit.Command getCommand(<String> name)

getContainer

<static> Element getContainer(<Element> element)

getCurrentState

<static> State getCurrentState(<Document> doc)

getInsertionPoint

<static> mozile.edit.InsertionPoint getInsertionPoint(<Node> node, <Integer> direction, <Boolean> force)

getMark

<static> Object getMark(<Element> element, <String> key)

getMarked

<static> Array getMarked(<String> key, <String> value)

getParentBlock

<static> Element getParentBlock(<Node> node)

isBlock

<static> Boolean isBlock(<Node> node)

isChildless

<static> Boolean isChildless(<Node> node)

isEditable

<static> Boolean isEditable(<Node> node)

isEditableElement

<static> Boolean isEditableElement(<Element> element)

isEmpty

<static> Boolean isEmpty(<Node> node)

isEmptyToken

<static> Boolean isEmptyToken(<Node> node)

isHigherPriority

<static> Boolean isHigherPriority(<String> higher, <String> lower)

isTextEditable

<static> Boolean isTextEditable(<Node> node)

lookupRNG

<static> mozile.rng.Element lookupRNG(<Node> node)

mayContainText

<static> Boolean mayContainText(<Node> node)

parseAccelerator

<static> Object parseAccelerator(<String> accelerator)

parseMES

<static> Void parseMES(<mozile.edit.Command> container, node, <Object> localization)

setMark

<static> Object setMark(<Element> element, <String> key, value)

setStatus

<static> Boolean setStatus(<Boolean> status)

splitAccelerators

<static> Array splitAccelerators(<String> accelerators)

start

<static> Boolean start()

stop

<static> Boolean stop()

updateClipboard

<static> Void updateClipboard()


Documentation generated by JSDoc on Wed Feb 20 13:25:28 2008