()
| 297 | } |
| 298 | |
| 299 | function beforeCursor() { |
| 300 | const s = getSelection() |
| 301 | const r0 = s.getRangeAt(0) |
| 302 | const r = document.createRange() |
| 303 | r.selectNodeContents(editor) |
| 304 | r.setEnd(r0.startContainer, r0.startOffset) |
| 305 | return r.toString() |
| 306 | } |
| 307 | |
| 308 | function afterCursor() { |
| 309 | const s = getSelection() |
no test coverage detected