nsIPlaintextEditor
| IID: | 1480e196-0d5c-40cf-8563-ed8a33eabcf2 |
| Inherits From: | nsISupports |
This interface is implemented by the following components:
Constants
Properties
PRInt32 maxTextLength
The maximum number of characters allowed. default: -1 (unlimited).
PRInt32 newlineHandling
Get and set newline handling.
Values are the constants defined above.
readonly PRInt32 textLength
The length of the contents in characters. XXX change this type to 'unsigned long'
PRInt32 wrapWidth
Get and set the body wrap width.
Special values: 0 = wrap to window width -1 = no wrap at all
Methods
void handleKeyPress ( nsIDOMKeyEvent keyEvent )
void insertLineBreak ( )
void insertText ( DOMString stringToInsert )
void setWrapColumn ( PRInt32 wrapColumn )
void handleKeyPress ( nsIDOMKeyEvent keyEvent )
EditorKeyPress consumes a keyevent.
- Arguments:
- keyEvent: key event to consume
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
void setWrapColumn ( PRInt32 wrapColumn )
Similar to the setter for wrapWidth, but just sets the editor internal state without actually changing the content being edited to wrap at that column. This should only be used by callers who are sure that their content is already set up correctly.
- Arguments:
- wrapColumn
Reference documentation is generated from Mozilla's source.
