nsIEditorMailSupport

Methods

pasteAsQuotation(aSelectionType)

Paste the text in the OS clipboard at the cursor position,
as a quotation (whose representation is dependant on the editor type),
replacing the selected text (if any).

Parameters

aSelectionType Text or html?

insertAsQuotation(aQuotedText)

Insert a string as quoted text
(whose representation is dependant on the editor type),
replacing the selected text (if any).

Parameters

aQuotedText The actual text to be quoted

Returns

The node which was inserted

insertTextWithQuotations(aStringToInsert)

Inserts a plaintext string at the current location,
with special processing for lines beginning with “>”,
which will be treated as mail quotes and inserted
as plaintext quoted blocks.
If the selection is not collapsed, the selection is deleted
and the insertion takes place at the resulting collapsed selection.

Parameters

aString the string to be inserted

pasteAsCitedQuotation(aCitation, aSelectionType)

Paste a string as quoted text,
whose representation is dependant on the editor type,
replacing the selected text (if any)

Parameters

aCitation The "mid" URL of the source message
aSelectionType Text or html?

insertAsCitedQuotation(aQuotedText, aCitation, aInsertHTML)

Insert a string as quoted text
(whose representation is dependant on the editor type),
replacing the selected text (if any),
including, if possible, a “cite” attribute.

Parameters

aQuotedText The actual text to be quoted
aCitation The "mid" URL of the source message
aInsertHTML Insert as html? (vs plaintext)

Returns

The node which was inserted

rewrap(aRespectNewlines)

Rewrap the selected part of the document, re-quoting if necessary.

Parameters

aRespectNewlines Try to maintain newlines in the original?

stripCites()

Strip any citations in the selected part of the document.

getEmbeddedObjects()

Get a list of IMG and OBJECT tags in the current document.