(html)
| 127 | } |
| 128 | |
| 129 | insertHTML(html) { |
| 130 | const document = HTMLParser.parse(html, { purifyOptions: { SAFE_FOR_XML: true } }).getDocument() |
| 131 | const selectedRange = this.getSelectedRange() |
| 132 | |
| 133 | this.setDocument(this.document.mergeDocumentAtRange(document, selectedRange)) |
| 134 | |
| 135 | const startPosition = selectedRange[0] |
| 136 | const endPosition = startPosition + document.getLength() - 1 |
| 137 | |
| 138 | this.setSelection(endPosition) |
| 139 | return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ]) |
| 140 | } |
| 141 | |
| 142 | replaceHTML(html) { |
| 143 | const document = HTMLParser.parse(html).getDocument().copyUsingObjectsFromDocument(this.document) |
nothing calls this directly
no test coverage detected