@yoopta/editor
Version:
<h2 align="center">Yoopta-Editor v1 🎉</h2> <p align="center">Yoopta-Editor - is an open source notion-like editor 💥</p> <div align="center"> <img width="574" alt="Screen Shot 2023-01-25 at 16 04 29" src="https://user-images.githubusercontent.com/2909311
20 lines • 726 B
TypeScript
import type { YooEditor } from '../types';
import type { GetSlateSelectionOptions } from './types';
/**
* Check if Slate selection is collapsed (cursor position)
*
* @param editor - YooEditor instance
* @param options - Check options
* @returns True if selection is collapsed, false otherwise
*
* @example
* ```typescript
* // Check if current selection is collapsed
* const isCollapsed = Selection.isCollapsed(editor);
*
* // Check if selection in specific block is collapsed
* const isCollapsed = Selection.isCollapsed(editor, { at: 0 });
* ```
*/
export declare function isCollapsed(editor: YooEditor, options?: GetSlateSelectionOptions): boolean;
//# sourceMappingURL=isCollapsed.d.ts.map