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"
8 interface nsISupportsArray
;
11 [scriptable
, uuid(fdf23301
-4a94
-11d3
-9ce4
-9960496c41bc
)]
13 interface nsIEditorMailSupport
: nsISupports
15 /** Paste the text in the OS clipboard at the cursor position,
16 * as a quotation (whose representation is dependant on the editor type),
17 * replacing the selected text (if any).
18 * @param aSelectionType Text or html?
20 void pasteAsQuotation
(in long aSelectionType
);
22 /** Insert a string as quoted text
23 * (whose representation is dependant on the editor type),
24 * replacing the selected text (if any).
25 * @param aQuotedText The actual text to be quoted
26 * @return The node which was inserted
28 nsIDOMNode insertAsQuotation
(in AString aQuotedText
);
31 * Inserts a plaintext string at the current location,
32 * with special processing for lines beginning with ">",
33 * which will be treated as mail quotes and inserted
34 * as plaintext quoted blocks.
35 * If the selection is not collapsed, the selection is deleted
36 * and the insertion takes place at the resulting collapsed selection.
38 * @param aString the string to be inserted
40 void insertTextWithQuotations
(in DOMString aStringToInsert
);
42 /** Paste a string as quoted text,
43 * whose representation is dependant on the editor type,
44 * replacing the selected text (if any)
45 * @param aCitation The "mid" URL of the source message
46 * @param aSelectionType Text or html?
48 void pasteAsCitedQuotation
(in AString aCitation
,
49 in long aSelectionType
);
51 /** Insert a string as quoted text
52 * (whose representation is dependant on the editor type),
53 * replacing the selected text (if any),
54 * including, if possible, a "cite" attribute.
55 * @param aQuotedText The actual text to be quoted
56 * @param aCitation The "mid" URL of the source message
57 * @param aInsertHTML Insert as html? (vs plaintext)
58 * @return The node which was inserted
60 nsIDOMNode insertAsCitedQuotation
(in AString aQuotedText
,
62 in boolean aInsertHTML
);
65 * Rewrap the selected part of the document, re-quoting if necessary.
66 * @param aRespectNewlines Try to maintain newlines in the original?
68 void rewrap
(in boolean aRespectNewlines
);
71 * Strip any citations in the selected part of the document.
77 * Get a list of IMG and OBJECT tags in the current document.
79 nsISupportsArray getEmbeddedObjects
();