@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
29 lines • 814 B
TypeScript
import { Editor, Path } from 'slate';
import type { YooEditor } from '../editor/types';
type BackspaceResult = {
action: 'delete-injected-element';
path: Path;
} | {
action: 'delete-block';
} | {
action: 'move-cursor';
targetPath: Path;
} | {
action: 'move-to-previous-block';
} | {
action: 'merge-with-previous-block';
} | {
action: 'default';
} | {
action: 'prevent';
};
/**
* Main function to determine the action for Backspace
*/
export declare function getBackspaceAction(editor: YooEditor, slate: Editor): BackspaceResult;
/**
* Executes the Backspace action
*/
export declare function executeBackspaceAction(editor: YooEditor, slate: Editor, result: BackspaceResult): void;
export {};
//# sourceMappingURL=execute-backspace-action.d.ts.map