1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
7 #include
"domstubs.idl"
14 Editor Action Listener interface to outside world
19 * A generic editor action listener interface.
21 * nsIEditActionListener is the interface used by applications wishing to be notified
22 * when the editor modifies the DOM tree.
24 * Note: this is the wrong class to implement if you are interested in generic
25 * change notifications. For generic notifications, you should implement
26 * nsIDocumentObserver.
28 [scriptable
, uuid(b22907b1
-ee93
-11d2
-8d50
-000064657374)]
29 interface nsIEditActionListener
: nsISupports
32 * Called after the editor deletes a node.
33 * @param aChild The node to delete
34 * @param aResult The result of the delete node operation.
36 void DidDeleteNode
(in Node aChild
, in nsresult aResult
);
39 * Called after the editor joins 2 nodes.
40 * @param aLeftNode This node will be merged into the right node
41 * @param aRightNode The node that will be merged into.
42 * There is no requirement that the two nodes be of
44 * @param aParent The parent of aRightNode
45 * @param aResult The result of the join operation.
47 void DidJoinNodes
(in Node aLeftNode
,
53 * Called after the editor inserts text.
54 * @param aTextNode This node getting inserted text.
55 * @param aOffset The offset in aTextNode to insert at.
56 * @param aString The string that gets inserted.
57 * @param aResult The result of the insert text operation.
59 void DidInsertText
(in CharacterData aTextNode
,
65 * Called before the editor deletes text.
66 * @param aTextNode This node getting text deleted.
67 * @param aOffset The offset in aTextNode to delete at.
68 * @param aLength The amount of text to delete.
70 void WillDeleteText
(in CharacterData aTextNode
,
75 * Called before the editor deletes the ranges.
76 * @param aRangesToDelete The ranges to be deleted.
78 void WillDeleteRanges
(in Array
<Range> aRangesToDelete
);