Merge mozilla-central and tracemonkey. (a=blockers)
[mozilla-central.git] / editor / idl / nsIEditorMailSupport.idl
blobc803dc4904fd4786387b3136005f3f1456afdb46
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998-2002
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Akkana Peck <akkana@netscape.com>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #include "nsISupports.idl"
41 interface nsISupportsArray;
42 interface nsIDOMNode;
44 [scriptable, uuid(fdf23301-4a94-11d3-9ce4-9960496c41bc)]
46 interface nsIEditorMailSupport : nsISupports
48 /** Paste the text in the OS clipboard at the cursor position,
49 * as a quotation (whose representation is dependant on the editor type),
50 * replacing the selected text (if any).
51 * @param aSelectionType Text or html?
53 void pasteAsQuotation(in long aSelectionType);
55 /** Insert a string as quoted text
56 * (whose representation is dependant on the editor type),
57 * replacing the selected text (if any).
58 * @param aQuotedText The actual text to be quoted
59 * @return The node which was inserted
61 nsIDOMNode insertAsQuotation(in AString aQuotedText);
63 /**
64 * Inserts a plaintext string at the current location,
65 * with special processing for lines beginning with ">",
66 * which will be treated as mail quotes and inserted
67 * as plaintext quoted blocks.
68 * If the selection is not collapsed, the selection is deleted
69 * and the insertion takes place at the resulting collapsed selection.
71 * @param aString the string to be inserted
73 void insertTextWithQuotations(in DOMString aStringToInsert);
75 /** Paste a string as quoted text,
76 * whose representation is dependant on the editor type,
77 * replacing the selected text (if any)
78 * @param aCitation The "mid" URL of the source message
79 * @param aSelectionType Text or html?
81 void pasteAsCitedQuotation(in AString aCitation,
82 in long aSelectionType);
84 /** Insert a string as quoted text
85 * (whose representation is dependant on the editor type),
86 * replacing the selected text (if any),
87 * including, if possible, a "cite" attribute.
88 * @param aQuotedText The actual text to be quoted
89 * @param aCitation The "mid" URL of the source message
90 * @param aInsertHTML Insert as html? (vs plaintext)
91 * @return The node which was inserted
93 nsIDOMNode insertAsCitedQuotation(in AString aQuotedText,
94 in AString aCitation,
95 in boolean aInsertHTML);
97 /**
98 * Rewrap the selected part of the document, re-quoting if necessary.
99 * @param aRespectNewlines Try to maintain newlines in the original?
101 void rewrap(in boolean aRespectNewlines);
104 * Strip any citations in the selected part of the document.
106 void stripCites();
110 * Get a list of IMG and OBJECT tags in the current document.
112 nsISupportsArray getEmbeddedObjects();