@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
26 lines • 811 B
TypeScript
import type { SlateElement, YooEditor } from '../types';
import type { GetElementsOptions } from './types';
/**
* Get multiple elements from a block
*
* @param editor - YooEditor instance
* @param options - Get options
* @returns Array of elements (empty array if none found)
*
* @example
* ```typescript
* // Get all items
* const items = editor.getElements({
* blockId: 'accordion-1',
* type: 'accordion-list-item'
* });
*
* // Get with custom matcher
* const expandedItems = editor.getElements({
* blockId: 'accordion-1',
* match: (el) => el.type === 'accordion-list-item' && el.props?.isExpanded
* });
* ```
*/
export declare function getElements(editor: YooEditor, options: GetElementsOptions): SlateElement[];
//# sourceMappingURL=getElements.d.ts.map