Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIEditActionListener Interface Reference

A generic editor action listener interface. More...

import "nsIEditActionListener.idl";

Inheritance diagram for nsIEditActionListener:
Inheritance graph
[legend]
Collaboration diagram for nsIEditActionListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void WillCreateNode (in DOMString aTag, in nsIDOMNode aParent, in long aPosition)
 Called before the editor creates a node.
void DidCreateNode (in DOMString aTag, in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition, in nsresult aResult)
 Called after the editor creates a node.
void WillInsertNode (in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition)
 Called before the editor inserts a node.
void DidInsertNode (in nsIDOMNode aNode, in nsIDOMNode aParent, in long aPosition, in nsresult aResult)
 Called after the editor inserts a node.
void WillDeleteNode (in nsIDOMNode aChild)
 Called before the editor deletes a node.
void DidDeleteNode (in nsIDOMNode aChild, in nsresult aResult)
 Called after the editor deletes a node.
void WillSplitNode (in nsIDOMNode aExistingRightNode, in long aOffset)
 Called before the editor splits a node.
void DidSplitNode (in nsIDOMNode aExistingRightNode, in long aOffset, in nsIDOMNode aNewLeftNode, in nsresult aResult)
 Called after the editor splits a node.
void WillJoinNodes (in nsIDOMNode aLeftNode, in nsIDOMNode aRightNode, in nsIDOMNode aParent)
 Called before the editor joins 2 nodes.
void DidJoinNodes (in nsIDOMNode aLeftNode, in nsIDOMNode aRightNode, in nsIDOMNode aParent, in nsresult aResult)
 Called after the editor joins 2 nodes.
void WillInsertText (in nsIDOMCharacterData aTextNode, in long aOffset, in DOMString aString)
 Called before the editor inserts text.
void DidInsertText (in nsIDOMCharacterData aTextNode, in long aOffset, in DOMString aString, in nsresult aResult)
 Called after the editor inserts text.
void WillDeleteText (in nsIDOMCharacterData aTextNode, in long aOffset, in long aLength)
 Called before the editor deletes text.
void DidDeleteText (in nsIDOMCharacterData aTextNode, in long aOffset, in long aLength, in nsresult aResult)
 Called before the editor deletes text.
void WillDeleteSelection (in nsISelection aSelection)
 Called before the editor deletes the selection.
void DidDeleteSelection (in nsISelection aSelection)
 Called after the editor deletes the selection.

Detailed Description

A generic editor action listener interface.

nsIEditActionListener is the interface used by applications wishing to be notified when the editor modifies the DOM tree.

Note: this is the wrong class to implement if you are interested in generic change notifications. For generic notifications, you should implement nsIDocumentObserver.

Definition at line 61 of file nsIEditActionListener.idl.


Member Function Documentation

void nsIEditActionListener::DidCreateNode ( in DOMString  aTag,
in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition,
in nsresult  aResult 
)

Called after the editor creates a node.

Parameters:
aTagThe tag name of the DOM Node to create.
aNodeThe DOM Node that was created.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResultThe result of the create node operation.

Called after the editor deletes a node.

Parameters:
aChildThe node to delete
aResultThe result of the delete node operation.

Called after the editor deletes the selection.

Parameters:
aSelectionThe selection, after deletion

Here is the caller graph for this function:

void nsIEditActionListener::DidDeleteText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in long  aLength,
in nsresult  aResult 
)

Called before the editor deletes text.

Parameters:
aTextNodeThis node getting text deleted
aOffsetThe offset in aTextNode to delete at.
aLengthThe amount of text to delete.
aResultThe result of the delete text operation.

Here is the caller graph for this function:

void nsIEditActionListener::DidInsertNode ( in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition,
in nsresult  aResult 
)

Called after the editor inserts a node.

Parameters:
aNodeThe DOM Node to insert.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResultThe result of the insert node operation.
void nsIEditActionListener::DidInsertText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in DOMString  aString,
in nsresult  aResult 
)

Called after the editor inserts text.

Parameters:
aTextNodeThis node getting inserted text
aOffsetThe offset in aTextNode to insert at.
aStringThe string that gets inserted.
aResultThe result of the insert text operation.

Here is the caller graph for this function:

void nsIEditActionListener::DidJoinNodes ( in nsIDOMNode  aLeftNode,
in nsIDOMNode  aRightNode,
in nsIDOMNode  aParent,
in nsresult  aResult 
)

Called after the editor joins 2 nodes.

Parameters:
aLeftNodeThis node will be merged into the right node
aRightNodeThe node that will be merged into. There is no requirement that the two nodes be of the same type.
aParentThe parent of aRightNode
aResultThe result of the join operation.
void nsIEditActionListener::DidSplitNode ( in nsIDOMNode  aExistingRightNode,
in long  aOffset,
in nsIDOMNode  aNewLeftNode,
in nsresult  aResult 
)

Called after the editor splits a node.

Parameters:
aExistingRightNodethe node to split. It will become the new node's next sibling.
aOffsetthe offset of aExistingRightNode's content|children to do the split at
aNewLeftNode[OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.
void nsIEditActionListener::WillCreateNode ( in DOMString  aTag,
in nsIDOMNode  aParent,
in long  aPosition 
)

Called before the editor creates a node.

Parameters:
aTagThe tag name of the DOM Node to create.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child

Called before the editor deletes a node.

Parameters:
aChildThe node to delete

Called before the editor deletes the selection.

Parameters:
aSelectionThe selection to be deleted

Here is the caller graph for this function:

Called before the editor deletes text.

Parameters:
aTextNodeThis node getting text deleted
aOffsetThe offset in aTextNode to delete at.
aLengthThe amount of text to delete.

Here is the caller graph for this function:

Called before the editor inserts a node.

Parameters:
aNodeThe DOM Node to insert.
aParentThe node to insert the new object into
aPositionThe place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
void nsIEditActionListener::WillInsertText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in DOMString  aString 
)

Called before the editor inserts text.

Parameters:
aTextNodeThis node getting inserted text
aOffsetThe offset in aTextNode to insert at.
aStringThe string that gets inserted.

Here is the caller graph for this function:

void nsIEditActionListener::WillJoinNodes ( in nsIDOMNode  aLeftNode,
in nsIDOMNode  aRightNode,
in nsIDOMNode  aParent 
)

Called before the editor joins 2 nodes.

Parameters:
aLeftNodeThis node will be merged into the right node
aRightNodeThe node that will be merged into. There is no requirement that the two nodes be of the same type.
aParentThe parent of aRightNode
void nsIEditActionListener::WillSplitNode ( in nsIDOMNode  aExistingRightNode,
in long  aOffset 
)

Called before the editor splits a node.

Parameters:
aExistingRightNodethe node to split. It will become the new node's next sibling.
aOffsetthe offset of aExistingRightNode's content|children to do the split at
aNewLeftNode[OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.

The documentation for this interface was generated from the following file: