michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsISupportsArray; michael@0: interface nsIDOMNode; michael@0: michael@0: [scriptable, uuid(fdf23301-4a94-11d3-9ce4-9960496c41bc)] michael@0: michael@0: interface nsIEditorMailSupport : nsISupports michael@0: { michael@0: /** Paste the text in the OS clipboard at the cursor position, michael@0: * as a quotation (whose representation is dependant on the editor type), michael@0: * replacing the selected text (if any). michael@0: * @param aSelectionType Text or html? michael@0: */ michael@0: void pasteAsQuotation(in long aSelectionType); michael@0: michael@0: /** Insert a string as quoted text michael@0: * (whose representation is dependant on the editor type), michael@0: * replacing the selected text (if any). michael@0: * @param aQuotedText The actual text to be quoted michael@0: * @return The node which was inserted michael@0: */ michael@0: nsIDOMNode insertAsQuotation(in AString aQuotedText); michael@0: michael@0: /** michael@0: * Inserts a plaintext string at the current location, michael@0: * with special processing for lines beginning with ">", michael@0: * which will be treated as mail quotes and inserted michael@0: * as plaintext quoted blocks. michael@0: * If the selection is not collapsed, the selection is deleted michael@0: * and the insertion takes place at the resulting collapsed selection. michael@0: * michael@0: * @param aString the string to be inserted michael@0: */ michael@0: void insertTextWithQuotations(in DOMString aStringToInsert); michael@0: michael@0: /** Paste a string as quoted text, michael@0: * whose representation is dependant on the editor type, michael@0: * replacing the selected text (if any) michael@0: * @param aCitation The "mid" URL of the source message michael@0: * @param aSelectionType Text or html? michael@0: */ michael@0: void pasteAsCitedQuotation(in AString aCitation, michael@0: in long aSelectionType); michael@0: michael@0: /** Insert a string as quoted text michael@0: * (whose representation is dependant on the editor type), michael@0: * replacing the selected text (if any), michael@0: * including, if possible, a "cite" attribute. michael@0: * @param aQuotedText The actual text to be quoted michael@0: * @param aCitation The "mid" URL of the source message michael@0: * @param aInsertHTML Insert as html? (vs plaintext) michael@0: * @return The node which was inserted michael@0: */ michael@0: nsIDOMNode insertAsCitedQuotation(in AString aQuotedText, michael@0: in AString aCitation, michael@0: in boolean aInsertHTML); michael@0: michael@0: /** michael@0: * Rewrap the selected part of the document, re-quoting if necessary. michael@0: * @param aRespectNewlines Try to maintain newlines in the original? michael@0: */ michael@0: void rewrap(in boolean aRespectNewlines); michael@0: michael@0: /** michael@0: * Strip any citations in the selected part of the document. michael@0: */ michael@0: void stripCites(); michael@0: michael@0: michael@0: /** michael@0: * Get a list of IMG and OBJECT tags in the current document. michael@0: */ michael@0: nsISupportsArray getEmbeddedObjects(); michael@0: }; michael@0: