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

40 lines • 1.02 kB
import type { Path } from 'slate'; import { Editor } from 'slate'; import type { YooEditor } from '../editor/types'; type EnterResult = { action: 'split-block'; } | { action: 'insert-block-after'; } | { action: 'insert-block-before'; } | { action: 'insert-soft-break'; } | { action: 'split-injected-element'; path: Path; } | { action: 'exit-injected-element'; injectedPath: Path; parentLeafPath: Path; } | { action: 'delete-empty-injected'; path: Path; } | { action: 'reset-to-paragraph'; } | { action: 'delegate-to-plugin'; } | { action: 'default'; } | { action: 'prevent'; }; /** * Main function to determine the action for Enter */ export declare function getEnterAction(editor: YooEditor, slate: Editor): EnterResult; /** * Executes the Enter action */ export declare function executeEnterAction(editor: YooEditor, slate: Editor, result: EnterResult): void; export {}; //# sourceMappingURL=enter-action.d.ts.map