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

21 lines • 661 B
import { Range } from 'slate'; import type { YooEditor } from '../types'; import type { GetRangeOptions } from './types'; /** * Get range from Slate selection * * @param editor - YooEditor instance * @param options - Get range options * @returns Range or null if no selection * * @example * ```typescript * // Get range from current block selection * const range = Selection.getRange(editor); * * // Get range from specific block * const range = Selection.getRange(editor, { at: 0 }); * ``` */ export declare function getRange(editor: YooEditor, options?: GetRangeOptions): Range | null; //# sourceMappingURL=getRange.d.ts.map