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

27 lines • 832 B
import type { NodeEntry } from 'slate'; import type { SlateElement, YooEditor } from '../types'; import type { GetElementEntryOptions } from './types'; /** * Get element entry [element, path] from a block * * @param editor - YooEditor instance * @param options - Get options * @returns Element entry or null if not found * * @example * ```typescript * // Get entry by type and path * const entry = editor.getElementEntry({ * blockId: 'accordion-1', * type: 'accordion-list-item', * path: [0, 1] * }); * * if (entry) { * const [element, path] = entry; * console.log('Element at path:', path); * } * ``` */ export declare function getElementEntry(editor: YooEditor, options: GetElementEntryOptions): NodeEntry<SlateElement> | null; //# sourceMappingURL=getElementEntry.d.ts.map