fix travis-ci: copied textRange function from prosemirror-view

This commit is contained in:
Chrissi2812
2019-03-07 18:28:27 +01:00
parent 8ddc0c016a
commit e441041860

View File

@@ -1,5 +1,11 @@
import { Plugin } from 'prosemirror-state'
import { textRange } from 'prosemirror-view/src/dom'
function textRange(node, from, to) {
const range = document.createRange()
range.setEnd(node, to == null ? node.nodeValue.length : to)
range.setStart(node, from || 0)
return range
}
function singleRect(object, bias) {
const rects = object.getClientRects()