tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIEditorMailSupport.idl (1978B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #include "nsISupports.idl"
      7 
      8 interface nsIArray;
      9 
     10 webidl Node;
     11 
     12 [scriptable, builtinclass, uuid(fdf23301-4a94-11d3-9ce4-9960496c41bc)]
     13 interface nsIEditorMailSupport : nsISupports
     14 {
     15  /** Insert a string as quoted text
     16    * (whose representation is dependant on the editor type),
     17    * replacing the selected text (if any),
     18    * including, if possible, a "cite" attribute.
     19    * @param aQuotedText  The actual text to be quoted
     20    * @param aCitation    The "mid" URL of the source message
     21    * @param aInsertHTML  Insert as html?  (vs plaintext)
     22    * @return             The node which was inserted
     23    */
     24  [can_run_script]
     25  Node insertAsCitedQuotation(in AString aQuotedText,
     26                              in AString aCitation,
     27                              in boolean aInsertHTML);
     28 
     29  /**
     30   * Rewrap the selected part of the document, re-quoting if necessary.
     31   * @param aRespectNewlines  Try to maintain newlines in the original?
     32   */
     33  [can_run_script]
     34  void rewrap(in boolean aRespectNewlines);
     35 
     36  /**
     37   * Inserts a plaintext string at the current location,
     38   * with special processing for lines beginning with ">",
     39   * which will be treated as mail quotes and inserted
     40   * as plaintext quoted blocks.
     41   * If the selection is not collapsed, the selection is deleted
     42   * and the insertion takes place at the resulting collapsed selection.
     43   *
     44   * @param aString   the string to be inserted
     45   */
     46  [can_run_script]
     47  void insertTextWithQuotations(in AString aStringToInsert);
     48 
     49  /** Get and set the body wrap width.
     50    *
     51    * Special values:
     52    *    0 = wrap to window width
     53    *   -1 = no wrap at all
     54    */
     55  [setter_can_run_script]
     56  attribute long wrapWidth;
     57 };