mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 02:59:01 +08:00
parent
ab147048cc
commit
4f1dfbc1ff
@ -3,7 +3,7 @@ import { Plugin, PluginKey } from 'prosemirror-state'
|
||||
function textRange(node, from, to) {
|
||||
const range = document.createRange()
|
||||
range.setEnd(node, to == null ? node.nodeValue.length : to)
|
||||
range.setStart(node, from || 0)
|
||||
range.setStart(node, Math.max(from, 0))
|
||||
return range
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user