Blame editor/nsIHTMLEditor.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
#include "domstubs.idl"
Packit f0b94e
Packit f0b94e
interface nsIContent;
Packit f0b94e
interface nsIArray;
Packit f0b94e
interface nsISelection;
Packit f0b94e
Packit f0b94e
%{C++
Packit f0b94e
namespace mozilla {
Packit f0b94e
namespace dom {
Packit f0b94e
class Element;
Packit f0b94e
}
Packit f0b94e
}
Packit f0b94e
%}
Packit f0b94e
Packit f0b94e
[ptr] native Element (mozilla::dom::Element);
Packit f0b94e
Packit f0b94e
[scriptable, builtinclass, uuid(87ee993e-985f-4a43-a974-0d9512da2fb0)]
Packit f0b94e
interface nsIHTMLEditor : nsISupports
Packit f0b94e
{
Packit f0b94e
%{C++
Packit f0b94e
  typedef short EAlignment;
Packit f0b94e
%}
Packit f0b94e
Packit f0b94e
  // used by GetAlignment()
Packit f0b94e
  const short eLeft = 0;
Packit f0b94e
  const short eCenter = 1;
Packit f0b94e
  const short eRight = 2;
Packit f0b94e
  const short eJustify = 3;
Packit f0b94e
Packit f0b94e
Packit f0b94e
  /* ------------ Inline property methods -------------- */
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * SetInlineProperty() sets the aggregate properties on the current selection
Packit f0b94e
   *
Packit f0b94e
   * @param aProperty   the property to set on the selection
Packit f0b94e
   * @param aAttribute  the attribute of the property, if applicable.
Packit f0b94e
   *                    May be null.
Packit f0b94e
   *                    Example: aProperty="font", aAttribute="color"
Packit f0b94e
   * @param aValue      if aAttribute is not null, the value of the attribute.
Packit f0b94e
   *                    May be null.
Packit f0b94e
   *                    Example: aProperty="font", aAttribute="color",
Packit f0b94e
   *                             aValue="0x00FFFF"
Packit f0b94e
   */
Packit f0b94e
  void setInlineProperty(in AString aProperty,
Packit f0b94e
                         in AString aAttribute,
Packit f0b94e
                         in AString aValue);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getInlineProperty() gets aggregate properties of the current selection.
Packit f0b94e
   * All object in the current selection are scanned and their attributes are
Packit f0b94e
   * represented in a list of Property object.
Packit f0b94e
   *
Packit f0b94e
   * @param aProperty   the property to get on the selection
Packit f0b94e
   * @param aAttribute  the attribute of the property, if applicable.
Packit f0b94e
   *                    May be null.
Packit f0b94e
   *                    Example: aProperty="font", aAttribute="color"
Packit f0b94e
   * @param aValue      if aAttribute is not null, the value of the attribute.
Packit f0b94e
   *                    May be null.
Packit f0b94e
   *                    Example: aProperty="font", aAttribute="color",
Packit f0b94e
   *                             aValue="0x00FFFF"
Packit f0b94e
   * @param aFirst      [OUT] PR_TRUE if the first text node in the
Packit f0b94e
   *                          selection has the property
Packit f0b94e
   * @param aAny        [OUT] PR_TRUE if any of the text nodes in the
Packit f0b94e
   *                          selection have the property
Packit f0b94e
   * @param aAll        [OUT] PR_TRUE if all of the text nodes in the
Packit f0b94e
   *                          selection have the property
Packit f0b94e
   */
Packit f0b94e
  void getInlineProperty(in AString aProperty,
Packit f0b94e
                         in AString aAttribute,
Packit f0b94e
                         in AString aValue,
Packit f0b94e
                         out boolean aFirst,
Packit f0b94e
                         out boolean aAny,
Packit f0b94e
                         out boolean aAll);
Packit f0b94e
Packit f0b94e
  AString getInlinePropertyWithAttrValue(in AString aProperty,
Packit f0b94e
                                         in AString aAttribute,
Packit f0b94e
                                         in AString aValue,
Packit f0b94e
                                         out boolean aFirst,
Packit f0b94e
                                         out boolean aAny,
Packit f0b94e
                                         out boolean aAll);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * removeAllInlineProperties() deletes all the inline properties from all
Packit f0b94e
   * text in the current selection.
Packit f0b94e
   */
Packit f0b94e
  void removeAllInlineProperties();
Packit f0b94e
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * removeInlineProperty() deletes the properties from all text in the current
Packit f0b94e
   * selection.  If aProperty is not set on the selection, nothing is done.
Packit f0b94e
   *
Packit f0b94e
   * @param aProperty   the property to remove from the selection
Packit f0b94e
   *                    All atoms are for normal HTML tags (e.g.:
Packit f0b94e
   *                    nsIEditorProperty::font) except when you want to
Packit f0b94e
   *                    remove just links and not named anchors.
Packit f0b94e
   *                    For that, use nsIEditorProperty::href
Packit f0b94e
   * @param aAttribute  the attribute of the property, if applicable.
Packit f0b94e
   *                    May be null.
Packit f0b94e
   *                    Example: aProperty=nsIEditorProptery::font,
Packit f0b94e
   *                    aAttribute="color"
Packit f0b94e
   *                    nsIEditProperty::allAttributes is special.
Packit f0b94e
   *                    It indicates that all content-based text properties
Packit f0b94e
   *                    are to be removed from the selection.
Packit f0b94e
   */
Packit f0b94e
  void removeInlineProperty(in AString aProperty, in AString aAttribute);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   *  Increase font size for text in selection by 1 HTML unit
Packit f0b94e
   *  All existing text is scanned for existing <FONT SIZE> attributes
Packit f0b94e
   *  so they will be incremented instead of inserting new <FONT> tag
Packit f0b94e
   */
Packit f0b94e
  void increaseFontSize();
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   *  Decrease font size for text in selection by 1 HTML unit
Packit f0b94e
   *  All existing text is scanned for existing <FONT SIZE> attributes
Packit f0b94e
   *  so they will be decreased instead of inserting new <FONT> tag
Packit f0b94e
   */
Packit f0b94e
  void decreaseFontSize();
Packit f0b94e
Packit f0b94e
  /* ------------ HTML content methods -------------- */
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Tests if a node is a BLOCK element according the the HTML 4.0 DTD.
Packit f0b94e
   *   This does NOT consider CSS effect on display type
Packit f0b94e
   *
Packit f0b94e
   * @param aNode      the node to test
Packit f0b94e
   */
Packit f0b94e
  boolean nodeIsBlock(in nsIDOMNode node);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Insert some HTML source at the current location
Packit f0b94e
   *
Packit f0b94e
   * @param aInputString   the string to be inserted
Packit f0b94e
   */
Packit f0b94e
  void insertHTML(in AString aInputString);
Packit f0b94e
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
    * Paste the text in the OS clipboard at the cursor position, replacing
Packit f0b94e
    * the selected text (if any), but strip out any HTML styles and formatting
Packit f0b94e
    */
Packit f0b94e
  void pasteNoFormatting(in long aSelectionType);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   *  Rebuild the entire document from source HTML
Packit f0b94e
   *  Needed to be able to edit HEAD and other outside-of-BODY content
Packit f0b94e
   *
Packit f0b94e
   *  @param aSourceString   HTML source string of the entire new document
Packit f0b94e
   */
Packit f0b94e
  void rebuildDocumentFromSource(in AString aSourceString);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Insert some HTML source, interpreting
Packit f0b94e
   * the string argument according to the given context.
Packit f0b94e
   *
Packit f0b94e
   * @param aInputString   the string to be inserted
Packit f0b94e
   * @param aContextStr    Context of insertion
Packit f0b94e
   * @param aInfoStr       Related info to aInputString
Packit f0b94e
   * @param aFlavor        Transferable flavor, can be ""
Packit f0b94e
   * @param aSourceDoc          document where input was dragged from (may be null)
Packit f0b94e
   * @param aDestinationNode    location for insertion (such as when dropped)
Packit f0b94e
   * @param aDestinationOffset  used with aDestNode to determine insert location
Packit f0b94e
   * @param aDeleteSelection    used with aDestNode during drag&drop
Packit f0b94e
   * @param aCollapseSelection  used with aDestNode during drag&drop
Packit f0b94e
   */
Packit f0b94e
  void insertHTMLWithContext(in AString aInputString,
Packit f0b94e
                             in AString aContextStr,
Packit f0b94e
                             in AString aInfoStr,
Packit f0b94e
                             in AString aFlavor,
Packit f0b94e
                             in nsIDOMDocument aSourceDoc,
Packit f0b94e
                             in nsIDOMNode aDestinationNode,
Packit f0b94e
                             in long aDestinationOffset,
Packit f0b94e
                             in boolean aDeleteSelection);
Packit f0b94e
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
    * Insert an element, which may have child nodes, at the selection
Packit f0b94e
    * Used primarily to insert a new element for various insert element dialogs,
Packit f0b94e
    *   but it enforces the HTML 4.0 DTD "CanContain" rules, so it should
Packit f0b94e
    *   be useful for other elements.
Packit f0b94e
    *
Packit f0b94e
    * @param aElement           The element to insert
Packit f0b94e
    * @param aDeleteSelection   Delete the selection before inserting
Packit f0b94e
    *     If aDeleteSelection is PR_FALSE, then the element is inserted
Packit f0b94e
    *     after the end of the selection for all element except
Packit f0b94e
    *     Named Anchors, which insert before the selection
Packit f0b94e
    */
Packit f0b94e
  void insertElementAtSelection(in nsIDOMElement aElement,
Packit f0b94e
                                in boolean aDeleteSelection);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   *   Set the BaseURL for the document to the current URL
Packit f0b94e
   *     but only if the page doesn't have a <base> tag
Packit f0b94e
   *   This should be done after the document URL has changed,
Packit f0b94e
   *     such as after saving a file
Packit f0b94e
   *   This is used as base for relativizing link and image urls
Packit f0b94e
   */
Packit f0b94e
  void updateBaseURL();
Packit f0b94e
Packit f0b94e
Packit f0b94e
  /* ------------ Selection manipulation -------------- */
Packit f0b94e
  /* Should these be moved to nsISelection? */
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
    * Set the selection at the suppled element
Packit f0b94e
    *
Packit f0b94e
    * @param aElement   An element in the document
Packit f0b94e
    */
Packit f0b94e
  void selectElement(in nsIDOMElement aElement);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
    * Create a collapsed selection just after aElement
Packit f0b94e
    *
Packit f0b94e
    * XXX could we parameterize SelectElement(before/select/after>?
Packit f0b94e
    *
Packit f0b94e
    * The selection is set to parent-of-aElement with an
Packit f0b94e
    *   offset 1 greater than aElement's offset
Packit f0b94e
    *   but it enforces the HTML 4.0 DTD "CanContain" rules, so it should
Packit f0b94e
    *   be useful for other elements.
Packit f0b94e
    *
Packit f0b94e
    * @param aElement  An element in the document
Packit f0b94e
    */
Packit f0b94e
  void setCaretAfterElement(in nsIDOMElement aElement);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * SetParagraphFormat       Insert a block paragraph tag around selection
Packit f0b94e
   * @param aParagraphFormat  "p", "h1" to "h6", "address", "pre", or "blockquote"
Packit f0b94e
   */
Packit f0b94e
  void setParagraphFormat(in AString aParagraphFormat);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getParagraphState returns what block tag paragraph format is in
Packit f0b94e
   * the selection.
Packit f0b94e
   * @param aMixed     True if there is more than one format
Packit f0b94e
   * @return           Name of block tag. "" is returned for none.
Packit f0b94e
   */
Packit f0b94e
  AString getParagraphState(out boolean aMixed);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getFontFaceState returns what font face is in the selection.
Packit f0b94e
   * @param aMixed    True if there is more than one font face
Packit f0b94e
   * @return          Name of face.  Note: "tt" is returned for
Packit f0b94e
   *                  tt tag.  "" is returned for none.
Packit f0b94e
   */
Packit f0b94e
  AString getFontFaceState(out boolean aMixed);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getFontColorState returns what font face is in the selection.
Packit f0b94e
   * @param aMixed     True if there is more than one font color
Packit f0b94e
   * @return           Color string. "" is returned for none.
Packit f0b94e
   */
Packit f0b94e
  AString getFontColorState(out boolean aMixed);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getFontColorState returns what font face is in the selection.
Packit f0b94e
   * @param aMixed     True if there is more than one font color
Packit f0b94e
   * @return           Color string. "" is returned for none.
Packit f0b94e
   */
Packit f0b94e
  AString getBackgroundColorState(out boolean aMixed);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getHighlightColorState returns what the highlight color of the selection.
Packit f0b94e
   * @param aMixed     True if there is more than one font color
Packit f0b94e
   * @return           Color string. "" is returned for none.
Packit f0b94e
   */
Packit f0b94e
  AString getHighlightColorState(out boolean aMixed);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getListState returns what list type is in the selection.
Packit f0b94e
   * @param aMixed    True if there is more than one type of list, or
Packit f0b94e
   *                  if there is some list and non-list
Packit f0b94e
   * @param aOL       The company that employs me.  No, really, it's
Packit f0b94e
   *                  true if an "ol" list is selected.
Packit f0b94e
   * @param aUL       true if an "ul" list is selected.
Packit f0b94e
   * @param aDL       true if a "dl" list is selected.
Packit f0b94e
   */
Packit f0b94e
  void getListState(out boolean aMixed, out boolean aOL, out boolean aUL,
Packit f0b94e
                    out boolean aDL);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getListItemState returns what list item type is in the selection.
Packit f0b94e
   * @param aMixed    True if there is more than one type of list item, or
Packit f0b94e
   *                  if there is some list and non-list
Packit f0b94e
   * @param aLI       true if "li" list items are selected.
Packit f0b94e
   * @param aDT       true if "dt" list items are selected.
Packit f0b94e
   * @param aDD       true if "dd" list items are selected.
Packit f0b94e
   */
Packit f0b94e
  void getListItemState(out boolean aMixed, out boolean aLI,
Packit f0b94e
                        out boolean aDT, out boolean aDD);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * getAlignment     returns what alignment is in the selection.
Packit f0b94e
   * @param aMixed    True if there is more than one type of list item, or
Packit f0b94e
   *                  if there is some list and non-list
Packit f0b94e
   * @param aAlign    enum value for first encountered alignment
Packit f0b94e
   *                  (left/center/right)
Packit f0b94e
   */
Packit f0b94e
  void getAlignment(out boolean aMixed, out short aAlign);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Document me!
Packit f0b94e
   *
Packit f0b94e
   */
Packit f0b94e
  void getIndentState(out boolean aCanIndent, out boolean aCanOutdent);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Document me!
Packit f0b94e
   *
Packit f0b94e
   */
Packit f0b94e
  void makeOrChangeList(in AString aListType, in boolean entireList,
Packit f0b94e
                        in AString aBulletType);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Document me!
Packit f0b94e
   *
Packit f0b94e
   */
Packit f0b94e
  void removeList(in AString aListType);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Document me!
Packit f0b94e
   *
Packit f0b94e
   */
Packit f0b94e
  void indent(in AString aIndent);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Document me!
Packit f0b94e
   *
Packit f0b94e
   */
Packit f0b94e
  void  align(in AString aAlign);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Return the input node or a parent matching the given aTagName,
Packit f0b94e
   *   starting the search at the supplied node.
Packit f0b94e
   * An example of use is for testing if a node is in a table cell
Packit f0b94e
   *   given a selection anchor node.
Packit f0b94e
   *
Packit f0b94e
   * @param aTagName  The HTML tagname
Packit f0b94e
   *  Special input values:
Packit f0b94e
   *    Use "href" to get a link node
Packit f0b94e
   *      (an "A" tag with the "href" attribute set)
Packit f0b94e
   *    Use "anchor" or "namedanchor" to get a named anchor node
Packit f0b94e
   *      (an "A" tag with the "name" attribute set)
Packit f0b94e
   *    Use "list" to get an OL, UL, or DL list node
Packit f0b94e
   *    Use "td" to get either a TD or TH cell node
Packit f0b94e
   *
Packit f0b94e
   * @param aNode    The node in the document to start the search.
Packit f0b94e
   *     If it is null, the anchor node of the current selection is used.
Packit f0b94e
   * @return         NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
Packit f0b94e
   *                 (passes NS_SUCCEEDED macro)
Packit f0b94e
   */
Packit f0b94e
  nsIDOMElement getElementOrParentByTagName(in AString aTagName,
Packit f0b94e
                                            in nsIDOMNode aNode);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Return an Element only if it is the only node selected,
Packit f0b94e
   *    such as an image, horizontal rule, etc.  The return type is
Packit f0b94e
   *    nsISupports for implementation convenience; the returned object,
Packit f0b94e
   *    if not null, is always a DOM Element.
Packit f0b94e
   *
Packit f0b94e
   * The exception is a link, which is more like a text attribute:
Packit f0b94e
   *    The Anchor tag is returned if the selection is within the textnode(s)
Packit f0b94e
   *    that are children of the "A" node.
Packit f0b94e
   *    This could be a collapsed selection, i.e., a caret
Packit f0b94e
   *    within the link text.
Packit f0b94e
   *
Packit f0b94e
   * @param aTagName  The HTML tagname or and empty string
Packit f0b94e
   *       to get any element (but only if it is the only element selected)
Packit f0b94e
   *    Special input values for Links and Named anchors:
Packit f0b94e
   *    Use "href" to get a link node
Packit f0b94e
   *      (an "A" tag with the "href" attribute set)
Packit f0b94e
   *    Use "anchor" or "namedanchor" to get a named anchor node
Packit f0b94e
   *      (an "A" tag with the "name" attribute set)
Packit f0b94e
   * @return the element as described above
Packit f0b94e
   */
Packit f0b94e
  nsISupports getSelectedElement(in AString aTagName);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Replace all children of <HEAD> with string of HTML source
Packit f0b94e
   */
Packit f0b94e
  void replaceHeadContentsWithHTML(in AString aSourceToInsert);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Return a new element with default attribute values
Packit f0b94e
   *
Packit f0b94e
   * This does not rely on the selection, and is not sensitive to context.
Packit f0b94e
   *
Packit f0b94e
   * Used primarily to supply new element for various insert element dialogs
Packit f0b94e
   *  (Image, Link, NamedAnchor, Table, and HorizontalRule
Packit f0b94e
   *   are the only returned elements as of 7/25/99)
Packit f0b94e
   *
Packit f0b94e
   * @param aTagName  The HTML tagname
Packit f0b94e
   *    Special input values for Links and Named anchors:
Packit f0b94e
   *    Use "href" to get a link node
Packit f0b94e
   *      (an "A" tag with the "href" attribute set)
Packit f0b94e
   *    Use "anchor" or "namedanchor" to get a named anchor node
Packit f0b94e
   *      (an "A" tag with the "name" attribute set)
Packit f0b94e
   * @return          The new element created.
Packit f0b94e
   */
Packit f0b94e
  nsIDOMElement createElementWithDefaults(in AString aTagName);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Insert an link element as the parent of the current selection
Packit f0b94e
   *
Packit f0b94e
   * @param aElement   An "A" element with a non-empty "href" attribute
Packit f0b94e
   */
Packit f0b94e
  void insertLinkAroundSelection(in nsIDOMElement aAnchorElement);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Set the value of the "bgcolor" attribute on the document's <body> element
Packit f0b94e
   *
Packit f0b94e
   * @param aColor  The HTML color string, such as "#ffccff" or "yellow"
Packit f0b94e
   */
Packit f0b94e
  void setBackgroundColor(in AString aColor);
Packit f0b94e
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Set an attribute on the document's <body> element
Packit f0b94e
   *    such as text, link, background colors
Packit f0b94e
   *
Packit f0b94e
   * 8/31/00 THIS ISN'T BEING USED? SHOULD WE DROP IT?
Packit f0b94e
   *
Packit f0b94e
   * @param aAttr   The attribute to be set
Packit f0b94e
   * @param aValue  The value of the attribute
Packit f0b94e
   */
Packit f0b94e
  void setBodyAttribute(in AString aAttr, in AString aValue);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Find all the nodes in the document which contain references
Packit f0b94e
   * to outside URIs (e.g. a href, img src, script src, etc.)
Packit f0b94e
   * The objects in the array will be type nsIURIRefObject.
Packit f0b94e
   *
Packit f0b94e
   * @return aNodeList    the linked nodes found
Packit f0b94e
   */
Packit f0b94e
  nsIArray getLinkedObjects();
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * A boolean which is true is the HTMLEditor has been instantiated
Packit f0b94e
   * with CSS knowledge and if the CSS pref is currently checked
Packit f0b94e
   *
Packit f0b94e
   * @return    true if CSS handled and enabled
Packit f0b94e
   */
Packit f0b94e
  attribute boolean isCSSEnabled;
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * returns the deepest container of the selection
Packit f0b94e
   * @return a DOM Element
Packit f0b94e
   */
Packit f0b94e
  nsIDOMElement getSelectionContainer();
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Checks if the anonymous nodes created by the HTML editor have to be
Packit f0b94e
   * refreshed or hidden depending on a possible new state of the selection
Packit f0b94e
   * @param aSelection [IN] a selection
Packit f0b94e
   */
Packit f0b94e
  void checkSelectionStateForAnonymousButtons(in nsISelection aSelection);
Packit f0b94e
Packit f0b94e
  boolean isAnonymousElement(in nsIDOMElement aElement);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * A boolean indicating if a return key pressed in a paragraph creates
Packit f0b94e
   * another paragraph or just inserts a 
at the caret
Packit f0b94e
   *
Packit f0b94e
   * @return    true if CR in a paragraph creates a new paragraph
Packit f0b94e
   */
Packit f0b94e
  attribute boolean returnInParagraphCreatesNewParagraph;
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Get an active editor's editing host in DOM window.  If this editor isn't
Packit f0b94e
   * active in the DOM window, this returns NULL.
Packit f0b94e
   */
Packit f0b94e
  [noscript, notxpcom] Element GetActiveEditingHost();
Packit f0b94e
};
Packit f0b94e