* Inserts a block of `text` at the indicated `position`. * @param {Point} position The position to start inserting at; it's an object that looks like `{ row: row, column: column}` * @param {String} text A chunk of text to insert * @returns {Point} The position ({row, column}) of the l
(position, text)
| 233 | |
| 234 | **/ |
| 235 | insert(position, text) { |
| 236 | // Only detect new lines if the document has no line break yet. |
| 237 | if (this.getLength() <= 1) |
| 238 | this.$detectNewLine(text); |
| 239 | |
| 240 | return this.insertMergedLines(position, this.$split(text)); |
| 241 | } |
| 242 | |
| 243 | /** |
| 244 | * Inserts `text` into the `position` at the current row. This method also triggers the `"change"` event. |
no test coverage detected