@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 • 797 B
TypeScript
import type { YooEditor } from '../types';
import type { IsBlockSelectedOptions } from './types';
/**
* Check if block is selected
*
* @param editor - YooEditor instance
* @param options - Check options
* @returns True if block is selected, false otherwise
*
* @example
* ```typescript
* // Check if block at order 0 is selected
* const isSelected = Selection.isBlockSelected(editor, { at: 0 });
*
* // Check if block is selected (by block data)
* const block = Blocks.getBlock(editor, { at: 0 });
* if (block) {
* const isSelected = Selection.isBlockSelected(editor, { at: block.meta.order });
* }
* ```
*/
export declare function isBlockSelected(editor: YooEditor, options: IsBlockSelectedOptions): boolean;
//# sourceMappingURL=isBlockSelected.d.ts.map