nsIEditingSession

IID:d39fd2b4-3978-45d2-a4be-ba448171b61b
Inherits From:nsISupports

This interface is implemented by the following components:


Constants

Error codes when we fail to create an editor is placed in attribute editorStatus
PRInt32 eEditorOK = 0
PRInt32 eEditorCreationInProgress = 1
PRInt32 eEditorErrorCantEditMimeType = 2
PRInt32 eEditorErrorFileNotFound = 3
PRInt32 eEditorErrorCantEditFramesets = 8
PRInt32 eEditorErrorUnknown = 9

Properties

readonly PRUint32 editorStatus

Status after editor creation and document loading Value is one of the above error codes


Methods

nsIEditor getEditorForWindow ( nsIDOMWindow window ) void makeWindowEditable ( nsIDOMWindow window , char* editorType , PRBool doAfterUriLoad ) void setEditorOnControllers ( nsIDOMWindow window , nsIEditor editor ) void setupEditorOnWindow ( nsIDOMWindow window ) void tearDownEditorOnWindow ( nsIDOMWindow window ) PRBool windowIsEditable ( nsIDOMWindow window )

nsIEditor getEditorForWindow ( nsIDOMWindow window )

Get the editor for this window. May return null

Arguments:
window

void makeWindowEditable ( nsIDOMWindow window , char* editorType , PRBool doAfterUriLoad )

Make this window editable

Arguments:
window: nsIDOMWindow, the window the embedder needs to make editable
editorType: string, "html" "htmlsimple" "text" "textsimple"
doAfterUriLoad

void setEditorOnControllers ( nsIDOMWindow window , nsIEditor editor )

Arguments:
window
editor

void setupEditorOnWindow ( nsIDOMWindow window )

Setup editor and related support objects

Arguments:
window

void tearDownEditorOnWindow ( nsIDOMWindow window )

Destroy editor and related support objects

Arguments:
window

PRBool windowIsEditable ( nsIDOMWindow window )

Test whether a specific window has had its editable flag set; it may have an editor now, or will get one after the uri load.

Use this, passing the content root window, to test if we've set up editing for this content.

Arguments:
window

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com