@portabletext/editor
Version:
Portable Text Editor made in React
12 lines (11 loc) • 432 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;
}
export {
getSelectionEndPoint,
isSelectionCollapsed
};
//# sourceMappingURL=util.is-selection-collapsed.js.map