WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIEditingSession

IID:274cd32e-3675-47e1-9d8a-fc6504ded9ce
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

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

void disableJSAndPlugins ( nsIDOMWindow window )

Disable scripts and plugins in window.

Arguments:
window

nsIEditor getEditorForWindow ( nsIDOMWindow window )

Get the editor for this window. May return null

Arguments:
window

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

Make this window editable

Arguments:
window: nsIDOMWindow, the window the embedder needs to make editable
editorType: string, "html" "htmlsimple" "text" "textsimple"
doAfterUriLoad
makeWholeDocumentEditable: if PR_TRUE make the whole document in window editable, otherwise it's the embedder who should make the document (or part of it) editable.
interactive: if PR_FALSE turn off scripting and plugins

void restoreJSAndPlugins ( nsIDOMWindow window )

Restore JS and plugins (enable/disable them) according to the state they were before the last call to disableJSAndPlugins.

Arguments:
window

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.