Blame editor/nsIEditorMailSupport.idl

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