Implemented by
[scriptable, uuid(b5f39ed4-1dd1-11b2-9d00-fd54d6f54962)]
interface nsIPlaintextEditor : nsISupports
Constants
const
short
eEditorPlaintextBit = 0
const
short
eEditorSingleLineBit = 1
const
short
eEditorPasswordBit = 2
const
short
eEditorReadonlyBit = 3
const
short
eEditorDisabledBit = 4
const
short
eEditorFilterInputBit = 5
const
short
eEditorMailBit = 6
const
short
eEditorUseAsyncUpdatesBit = 7
const
short
eEditorEnableWrapHackBit = 8
const
short
eEditorWidgetBit = 9
const
short
eEditorNoCSSBit = 10
const
long
eEditorPlaintextMask = 1
const
long
eEditorSingleLineMask = 2
const
long
eEditorPasswordMask = 4
const
long
eEditorReadonlyMask = 8
const
long
eEditorDisabledMask = 16
const
long
eEditorFilterInputMask = 32
const
long
eEditorMailMask = 64
const
long
eEditorUseAsyncUpdatesMask = 128
const
long
eEditorEnableWrapHackMask = 256
const
long
eEditorWidgetMask = 512
const
long
eEditorNoCSSMask = 1024
Attributes
The maximum number of characters allowed.
attribute
long
maxTextLength
The length of the contents in characters.
readonly attribute
long
textLength
Get and set the body wrap width.
Special values:
0 = wrap to window width
-1 = no wrap at all
attribute
long
wrapWidth
Methods
EditorKeyPress consumes a keyevent. @param aKeyEvent key event to consume
[noscript]
void
handleKeyPress(in nsIDOMKeyEvent aKeyEvent)
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
insertLineBreak()
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. @param aString the string to be inserted
void
insertText(in DOMString aStringToInsert)
Compare to: