Skip to content

Commit

Permalink
fix travis-ci: copied textRange function from prosemirror-view
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrissi2812 committed Mar 7, 2019
1 parent 8ddc0c0 commit e441041
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/tiptap/src/Plugins/MenuBubble.js
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit e441041

Please sign in to comment.