@portabletext/editor
Version:
Portable Text Editor made in React
11 lines (10 loc) • 494 B
JavaScript
;
function getSelectionEndPoint(selection) {
return selection ? selection.backward ? selection.anchor : selection.focus : null;
}
function isSelectionCollapsed(selection) {
return selection ? selection.anchor.path.join() === selection.focus.path.join() && selection.anchor.offset === selection.focus.offset : !1;
}
exports.getSelectionEndPoint = getSelectionEndPoint;
exports.isSelectionCollapsed = isSelectionCollapsed;
//# sourceMappingURL=util.is-selection-collapsed.cjs.map