UNPKG

@portabletext/editor

Version:

Portable Text Editor made in React

14 lines (11 loc) 292 B
import type {EditorSelection} from '../types/editor' import {isSelectionCollapsed} from './util.is-selection-collapsed' /** * @public */ export function isSelectionExpanded(selection: EditorSelection) { if (!selection) { return false } return !isSelectionCollapsed(selection) }