UNPKG

@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

23 lines • 820 B
import type { YooEditor } from '../types'; import type { GetSlateSelectionOptions } from './types'; /** * Get Slate selection from block * * @param editor - YooEditor instance * @param options - Get selection options * @returns Slate selection (Range) or null * * @example * ```typescript * // Get selection from current block * const selection = Selection.getSlateSelection(editor); * * // Get selection from specific block * const selection = Selection.getSlateSelection(editor, { at: 0 }); * * // Get selection from block by ID * const selection = Selection.getSlateSelection(editor, { blockId: 'block-1' }); * ``` */ export declare function getSlateSelection(editor: YooEditor, options?: GetSlateSelectionOptions): Range | null; //# sourceMappingURL=getSlateSelection.d.ts.map