editor/idl/nsIEditorMailSupport.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 interface nsISupportsArray;
michael@0 9 interface nsIDOMNode;
michael@0 10
michael@0 11 [scriptable, uuid(fdf23301-4a94-11d3-9ce4-9960496c41bc)]
michael@0 12
michael@0 13 interface nsIEditorMailSupport : nsISupports
michael@0 14 {
michael@0 15 /** Paste the text in the OS clipboard at the cursor position,
michael@0 16 * as a quotation (whose representation is dependant on the editor type),
michael@0 17 * replacing the selected text (if any).
michael@0 18 * @param aSelectionType Text or html?
michael@0 19 */
michael@0 20 void pasteAsQuotation(in long aSelectionType);
michael@0 21
michael@0 22 /** Insert a string as quoted text
michael@0 23 * (whose representation is dependant on the editor type),
michael@0 24 * replacing the selected text (if any).
michael@0 25 * @param aQuotedText The actual text to be quoted
michael@0 26 * @return The node which was inserted
michael@0 27 */
michael@0 28 nsIDOMNode insertAsQuotation(in AString aQuotedText);
michael@0 29
michael@0 30 /**
michael@0 31 * Inserts a plaintext string at the current location,
michael@0 32 * with special processing for lines beginning with ">",
michael@0 33 * which will be treated as mail quotes and inserted
michael@0 34 * as plaintext quoted blocks.
michael@0 35 * If the selection is not collapsed, the selection is deleted
michael@0 36 * and the insertion takes place at the resulting collapsed selection.
michael@0 37 *
michael@0 38 * @param aString the string to be inserted
michael@0 39 */
michael@0 40 void insertTextWithQuotations(in DOMString aStringToInsert);
michael@0 41
michael@0 42 /** Paste a string as quoted text,
michael@0 43 * whose representation is dependant on the editor type,
michael@0 44 * replacing the selected text (if any)
michael@0 45 * @param aCitation The "mid" URL of the source message
michael@0 46 * @param aSelectionType Text or html?
michael@0 47 */
michael@0 48 void pasteAsCitedQuotation(in AString aCitation,
michael@0 49 in long aSelectionType);
michael@0 50
michael@0 51 /** Insert a string as quoted text
michael@0 52 * (whose representation is dependant on the editor type),
michael@0 53 * replacing the selected text (if any),
michael@0 54 * including, if possible, a "cite" attribute.
michael@0 55 * @param aQuotedText The actual text to be quoted
michael@0 56 * @param aCitation The "mid" URL of the source message
michael@0 57 * @param aInsertHTML Insert as html? (vs plaintext)
michael@0 58 * @return The node which was inserted
michael@0 59 */
michael@0 60 nsIDOMNode insertAsCitedQuotation(in AString aQuotedText,
michael@0 61 in AString aCitation,
michael@0 62 in boolean aInsertHTML);
michael@0 63
michael@0 64 /**
michael@0 65 * Rewrap the selected part of the document, re-quoting if necessary.
michael@0 66 * @param aRespectNewlines Try to maintain newlines in the original?
michael@0 67 */
michael@0 68 void rewrap(in boolean aRespectNewlines);
michael@0 69
michael@0 70 /**
michael@0 71 * Strip any citations in the selected part of the document.
michael@0 72 */
michael@0 73 void stripCites();
michael@0 74
michael@0 75
michael@0 76 /**
michael@0 77 * Get a list of IMG and OBJECT tags in the current document.
michael@0 78 */
michael@0 79 nsISupportsArray getEmbeddedObjects();
michael@0 80 };
michael@0 81

mercurial