nsIPlaintextEditor

IID:b5f39ed4-1dd1-11b2-9d00-fd54d6f54962
Inherits From:nsISupports

This interface is implemented by the following components:


Constants

PRInt16 eEditorPlaintextBit = 0
PRInt16 eEditorSingleLineBit = 1
PRInt16 eEditorPasswordBit = 2
PRInt16 eEditorReadonlyBit = 3
PRInt16 eEditorDisabledBit = 4
PRInt16 eEditorFilterInputBit = 5
PRInt16 eEditorMailBit = 6
PRInt16 eEditorUseAsyncUpdatesBit = 7
PRInt16 eEditorEnableWrapHackBit = 8
PRInt16 eEditorWidgetBit = 9
PRInt16 eEditorNoCSSBit = 10
PRInt32 eEditorPlaintextMask = 1
PRInt32 eEditorSingleLineMask = 2
PRInt32 eEditorPasswordMask = 4
PRInt32 eEditorReadonlyMask = 8
PRInt32 eEditorDisabledMask = 16
PRInt32 eEditorFilterInputMask = 32
PRInt32 eEditorMailMask = 64
PRInt32 eEditorUseAsyncUpdatesMask = 128
PRInt32 eEditorEnableWrapHackMask = 256
PRInt32 eEditorWidgetMask = 512
PRInt32 eEditorNoCSSMask = 1024

Properties

PRInt32 maxTextLength

The maximum number of characters allowed.

readonly PRInt32 textLength

The length of the contents in characters.

PRInt32 wrapWidth

Get and set the body wrap width.

Special values: 0 = wrap to window width -1 = no wrap at all


Methods

[noscript] void handleKeyPress ( nsIDOMKeyEvent keyEvent ) void insertLineBreak ( ) void insertText ( DOMString stringToInsert )

void handleKeyPress ( nsIDOMKeyEvent keyEvent )

EditorKeyPress consumes a keyevent.

Arguments:
keyEvent: key event to consume

void insertLineBreak ( )

Insert a line break into the content model. The interpretation of a break is up to the implementation: it may enter a character, split a node in the tree, etc. This may be more efficient than calling InsertText with a newline.


void insertText ( DOMString stringToInsert )

Inserts a string at the current location, given by the selection. If the selection is not collapsed, the selection is deleted and the insertion takes place at the resulting collapsed selection.

Arguments:
stringToInsert

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com