|
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/. */ |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 interface nsISupportsArray; |
|
9 interface nsIDOMNode; |
|
10 |
|
11 [scriptable, uuid(fdf23301-4a94-11d3-9ce4-9960496c41bc)] |
|
12 |
|
13 interface nsIEditorMailSupport : nsISupports |
|
14 { |
|
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? |
|
19 */ |
|
20 void pasteAsQuotation(in long aSelectionType); |
|
21 |
|
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 |
|
27 */ |
|
28 nsIDOMNode insertAsQuotation(in AString aQuotedText); |
|
29 |
|
30 /** |
|
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. |
|
37 * |
|
38 * @param aString the string to be inserted |
|
39 */ |
|
40 void insertTextWithQuotations(in DOMString aStringToInsert); |
|
41 |
|
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? |
|
47 */ |
|
48 void pasteAsCitedQuotation(in AString aCitation, |
|
49 in long aSelectionType); |
|
50 |
|
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 |
|
59 */ |
|
60 nsIDOMNode insertAsCitedQuotation(in AString aQuotedText, |
|
61 in AString aCitation, |
|
62 in boolean aInsertHTML); |
|
63 |
|
64 /** |
|
65 * Rewrap the selected part of the document, re-quoting if necessary. |
|
66 * @param aRespectNewlines Try to maintain newlines in the original? |
|
67 */ |
|
68 void rewrap(in boolean aRespectNewlines); |
|
69 |
|
70 /** |
|
71 * Strip any citations in the selected part of the document. |
|
72 */ |
|
73 void stripCites(); |
|
74 |
|
75 |
|
76 /** |
|
77 * Get a list of IMG and OBJECT tags in the current document. |
|
78 */ |
|
79 nsISupportsArray getEmbeddedObjects(); |
|
80 }; |
|
81 |