* Replaces all the lines in the current `Document` with the value of `text`. * * @param {String} text The text to use
(text)
| 43 | * @param {String} text The text to use |
| 44 | **/ |
| 45 | setValue(text) { |
| 46 | var len = this.getLength() - 1; |
| 47 | this.remove(new Range(0, 0, len, this.getLine(len).length)); |
| 48 | this.insert({row: 0, column: 0}, text || ""); |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Returns all the lines in the document as a single string, joined by the new line character. |