1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/idl/nsIEditorMailSupport.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,81 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +interface nsISupportsArray; 1.12 +interface nsIDOMNode; 1.13 + 1.14 +[scriptable, uuid(fdf23301-4a94-11d3-9ce4-9960496c41bc)] 1.15 + 1.16 +interface nsIEditorMailSupport : nsISupports 1.17 +{ 1.18 + /** Paste the text in the OS clipboard at the cursor position, 1.19 + * as a quotation (whose representation is dependant on the editor type), 1.20 + * replacing the selected text (if any). 1.21 + * @param aSelectionType Text or html? 1.22 + */ 1.23 + void pasteAsQuotation(in long aSelectionType); 1.24 + 1.25 + /** Insert a string as quoted text 1.26 + * (whose representation is dependant on the editor type), 1.27 + * replacing the selected text (if any). 1.28 + * @param aQuotedText The actual text to be quoted 1.29 + * @return The node which was inserted 1.30 + */ 1.31 + nsIDOMNode insertAsQuotation(in AString aQuotedText); 1.32 + 1.33 + /** 1.34 + * Inserts a plaintext string at the current location, 1.35 + * with special processing for lines beginning with ">", 1.36 + * which will be treated as mail quotes and inserted 1.37 + * as plaintext quoted blocks. 1.38 + * If the selection is not collapsed, the selection is deleted 1.39 + * and the insertion takes place at the resulting collapsed selection. 1.40 + * 1.41 + * @param aString the string to be inserted 1.42 + */ 1.43 + void insertTextWithQuotations(in DOMString aStringToInsert); 1.44 + 1.45 + /** Paste a string as quoted text, 1.46 + * whose representation is dependant on the editor type, 1.47 + * replacing the selected text (if any) 1.48 + * @param aCitation The "mid" URL of the source message 1.49 + * @param aSelectionType Text or html? 1.50 + */ 1.51 + void pasteAsCitedQuotation(in AString aCitation, 1.52 + in long aSelectionType); 1.53 + 1.54 + /** Insert a string as quoted text 1.55 + * (whose representation is dependant on the editor type), 1.56 + * replacing the selected text (if any), 1.57 + * including, if possible, a "cite" attribute. 1.58 + * @param aQuotedText The actual text to be quoted 1.59 + * @param aCitation The "mid" URL of the source message 1.60 + * @param aInsertHTML Insert as html? (vs plaintext) 1.61 + * @return The node which was inserted 1.62 + */ 1.63 + nsIDOMNode insertAsCitedQuotation(in AString aQuotedText, 1.64 + in AString aCitation, 1.65 + in boolean aInsertHTML); 1.66 + 1.67 + /** 1.68 + * Rewrap the selected part of the document, re-quoting if necessary. 1.69 + * @param aRespectNewlines Try to maintain newlines in the original? 1.70 + */ 1.71 + void rewrap(in boolean aRespectNewlines); 1.72 + 1.73 + /** 1.74 + * Strip any citations in the selected part of the document. 1.75 + */ 1.76 + void stripCites(); 1.77 + 1.78 + 1.79 + /** 1.80 + * Get a list of IMG and OBJECT tags in the current document. 1.81 + */ 1.82 + nsISupportsArray getEmbeddedObjects(); 1.83 +}; 1.84 +