Contains the text of the document. Document can be attached to several EditSessions. At its core, Documents are just an array of strings, with each row in the document matching up to the array index.
Document[edit]
Constructors
Methods
- Document.$clipPosition(position)
- Document.$detectNewLine(text)
- Void
- Document.applyDeltas(deltas)
- Void
Applies all the changes previously accumulated. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
- Document.getAllLines()
- [ String ]
Returns all lines in the document as string array. Warning: The caller should not modify this array!
- Document.getLength()
Returns the number of rows in the document.
- Document.getNewLineCharacter()
Returns the newline character that's being used, depending on the value of newLineMode.
- Document.getNewLineMode()
Returns the type of newlines being used; either windows, unix, or auto
- Document.getValue()
Returns all the lines in the document as a single string, split by the new line character.
- Document.revertDeltas(deltas)
- Void
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.