Interface nsIHTMLEditorType

Hierarchy

Properties

isCSSEnabled: boolean

A boolean which is true is the HTMLEditor has been instantiated with CSS knowledge and if the CSS pref is currently checked

Returns

true if CSS handled and enabled

returnInParagraphCreatesNewParagraph: boolean

A boolean indicating if a return key pressed in a paragraph creates another paragraph or just inserts a
at the caret

Returns

true if CR in a paragraph creates a new paragraph

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • checkSelectionStateForAnonymousButtons() may refresh editing UI such as resizers, inline-table-editing UI, absolute positioning UI for current Selection and focus state. When this method shows or hides UI, the editor (and/or its document/window) could be broken by mutation observers. FYI: Current user in script is only BlueGriffon.

    Returns void

  • Return a new element with default attribute values

    This does not rely on the selection, and is not sensitive to context.

    Used primarily to supply new element for various insert element dialogs (Image, Link, NamedAnchor, Table, and HorizontalRule are the only returned elements as of 7/25/99)

    Returns

    The new element created.

    Parameters

    • aTagName: string

      The HTML tagname Special input values for Links and Named anchors: Use "href" to get a link node (an "A" tag with the "href" attribute set) Use "anchor" or "namedanchor" to get a named anchor node (an "A" tag with the "name" attribute set)

    Returns Element

  • getAlignment returns what alignment is in the selection.

    Parameters

    • aMixed: boolean

      Always returns false.

    • aAlign: number

      enum value for first encountered alignment (left/center/right)

    Returns void

  • getFontFaceState returns what font face is in the selection.

    Returns

    Name of face. Note: "tt" is returned for tt tag. "" is returned for none.

    Parameters

    • aMixed: boolean

      True if there is more than one font face

    Returns string

  • getHighlightColorState returns what the highlight color of the selection.

    Returns

    Color string. "" is returned for none.

    Parameters

    • aMixed: boolean

      True if there is more than one font color

    Returns string

  • getInlinePropertyWithAttrValue() gets aggregate properties of the current selection. All object in the current selection are scanned and their attributes are represented in a list of Property object.

    Parameters

    • aProperty: string

      the property to get on the selection

    • aAttribute: string

      the attribute of the property, if applicable. May be null. Example: aProperty="font", aAttribute="color"

    • aValue: string

      if aAttribute is not null, the value of the attribute. May be null. Example: aProperty="font", aAttribute="color", aValue="0x00FFFF"

    • aFirst: boolean

      [OUT] PR_TRUE if the first text node in the selection has the property

    • aAny: boolean

      [OUT] PR_TRUE if any of the text nodes in the selection have the property

    • aAll: boolean

      [OUT] PR_TRUE if all of the text nodes in the selection have the property

    Returns string

  • getListItemState returns what list item type is in the selection.

    Parameters

    • aMixed: boolean

      True if there is more than one type of list item, or if there is some list and non-list XXX This ignores - element selected state. For example, even if - and <dt> are selected, this is set to false.

    • aLI: boolean

      true if "li" list items are selected.

    • aDT: boolean

      true if "dt" list items are selected.

    • aDD: boolean

      true if "dd" list items are selected.

    Returns void

  • getListState returns what list type is in the selection.

    Parameters

    • aMixed: boolean

      True if there is more than one type of list, or if there is some list and non-list

    • aOL: boolean

      The company that employs me. No, really, it's true if an "ol" list is selected.

    • aUL: boolean

      true if an "ul" list is selected.

    • aDL: boolean

      true if a "dl" list is selected.

    Returns void

  • getParagraphState returns what block tag paragraph format is in the selection.

    Returns

    Name of block tag. "" is returned for none.

    Parameters

    • aMixed: boolean

      True if there is more than one format

    Returns string

  • Insert an element, which may have child nodes, at the selection Used primarily to insert a new element for various insert element dialogs, but it enforces the HTML 4.0 DTD "CanContain" rules, so it should be useful for other elements.

    Parameters

    • aElement: Element

      The element to insert

    • aDeleteSelection: boolean

      Delete the selection before inserting If aDeleteSelection is PR_FALSE, then the element is inserted after the end of the selection for all element except Named Anchors, which insert before the selection

    Returns void

  • Insert some HTML source at the current location

    Parameters

    • aInputString: string

      the string to be inserted

    Returns void

  • Insert an link element as the parent of the current selection

    Parameters

    • aAnchorElement: Element

    Returns void

  • Parameters

    • aElement: Element

    Returns boolean

  • Document me!

    Parameters

    • aListType: string
    • entireList: boolean
    • aBulletType: string

    Returns void

  • ------------ HTML content methods --------------

    Tests if a node is a BLOCK element according the the HTML 4.0 DTD. This does NOT consider CSS effect on display type

    Parameters

    • node: Node

    Returns boolean

  • Rebuild the entire document from source HTML Needed to be able to edit HEAD and other outside-of-BODY content

    Parameters

    • aSourceString: string

      HTML source string of the entire new document

    Returns void

  • removeList removes list items (- ,

    , and
    ) and list structures (, , and
    ).

    Parameters

    • aListType: string

      Unused.

    Returns void

  • ------------ Selection manipulation --------------

    Should these be moved to Selection?

    Set the selection at the suppled element

    Parameters

    • aElement: Element

      An element in the document

    Returns void

  • Set the value of the "bgcolor" attribute on the document's element

    Parameters

    • aColor: string

      The HTML color string, such as "#ffccff" or "yellow"

    Returns void

  • ------------ Inline property methods --------------

    SetInlineProperty() sets the aggregate properties on the current selection

    Parameters

    • aProperty: string

      the property to set on the selection

    • aAttribute: string

      the attribute of the property, if applicable. May be null. Example: aProperty="font", aAttribute="color"

    • aValue: string

      if aAttribute is not null, the value of the attribute. May be null. Example: aProperty="font", aAttribute="color", aValue="0x00FFFF"

    Returns void

  • Set the BaseURL for the document to the current URL but only if the page doesn't have a tag This should be done after the document URL has changed, such as after saving a file This is used as base for relativizing link and image urls

    Returns void

Generated using TypeDoc