(text, range)
| 124 | } |
| 125 | |
| 126 | insertTextAtRange(text, range) { |
| 127 | range = normalizeRange(range) |
| 128 | const [ startPosition ] = range |
| 129 | const { index, offset } = this.locationFromPosition(startPosition) |
| 130 | |
| 131 | const document = this.removeTextAtRange(range) |
| 132 | return new this.constructor( |
| 133 | document.blockList.editObjectAtIndex(index, (block) => |
| 134 | block.copyWithText(block.text.insertTextAtPosition(text, offset)) |
| 135 | ) |
| 136 | ) |
| 137 | } |
| 138 | |
| 139 | removeTextAtRange(range) { |
| 140 | let blocks |
no test coverage detected