Public Member Functions

nsIEditActionListener Interface Reference

A generic editor action listener interface. More...

import "nsIEditActionListener.idl";

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.


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:
aTag The tag name of the DOM Node to create.
aNode The DOM Node that was created.
aParent The node to insert the new object into
aPosition The place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResult The result of the create node operation.
void nsIEditActionListener::DidDeleteNode ( in nsIDOMNode  aChild,
in nsresult  aResult 
)

Called after the editor deletes a node.

Parameters:
aChild The node to delete
aResult The result of the delete node operation.
void nsIEditActionListener::DidDeleteSelection ( in nsISelection  aSelection  ) 

Called after the editor deletes the selection.

Parameters:
aSelection The selection, after deletion
void nsIEditActionListener::DidDeleteText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in long  aLength,
in nsresult  aResult 
)

Called before the editor deletes text.

Parameters:
aTextNode This node getting text deleted
aOffset The offset in aTextNode to delete at.
aLength The amount of text to delete.
aResult The result of the delete text operation.
void nsIEditActionListener::DidInsertNode ( in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition,
in nsresult  aResult 
)

Called after the editor inserts a node.

Parameters:
aNode The DOM Node to insert.
aParent The node to insert the new object into
aPosition The place in aParent to insert the new node 0=first child, 1=second child, etc. any number > number of current children = last child
aResult The 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:
aTextNode This node getting inserted text
aOffset The offset in aTextNode to insert at.
aString The string that gets inserted.
aResult The result of the insert text operation.
void nsIEditActionListener::DidJoinNodes ( in nsIDOMNode  aLeftNode,
in nsIDOMNode  aRightNode,
in nsIDOMNode  aParent,
in nsresult  aResult 
)

Called after the editor joins 2 nodes.

Parameters:
aLeftNode This node will be merged into the right node
aRightNode The node that will be merged into. There is no requirement that the two nodes be of the same type.
aParent The parent of aRightNode
aResult The 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:
aExistingRightNode the node to split. It will become the new node's next sibling.
aOffset the 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:
aTag The tag name of the DOM Node to create.
aParent The node to insert the new object into
aPosition The 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::WillDeleteNode ( in nsIDOMNode  aChild  ) 

Called before the editor deletes a node.

Parameters:
aChild The node to delete
void nsIEditActionListener::WillDeleteSelection ( in nsISelection  aSelection  ) 

Called before the editor deletes the selection.

Parameters:
aSelection The selection to be deleted
void nsIEditActionListener::WillDeleteText ( in nsIDOMCharacterData  aTextNode,
in long  aOffset,
in long  aLength 
)

Called before the editor deletes text.

Parameters:
aTextNode This node getting text deleted
aOffset The offset in aTextNode to delete at.
aLength The amount of text to delete.
void nsIEditActionListener::WillInsertNode ( in nsIDOMNode  aNode,
in nsIDOMNode  aParent,
in long  aPosition 
)

Called before the editor inserts a node.

Parameters:
aNode The DOM Node to insert.
aParent The node to insert the new object into
aPosition The 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:
aTextNode This node getting inserted text
aOffset The offset in aTextNode to insert at.
aString The string that gets inserted.
void nsIEditActionListener::WillJoinNodes ( in nsIDOMNode  aLeftNode,
in nsIDOMNode  aRightNode,
in nsIDOMNode  aParent 
)

Called before the editor joins 2 nodes.

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

Called before the editor splits a node.

Parameters:
aExistingRightNode the node to split. It will become the new node's next sibling.
aOffset the 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: