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

26 lines • 1.17 kB
import type { CSSProperties, ReactNode } from 'react'; import type { YooptaOperation } from './editor/core/applyTransforms'; import type { YooEditor, YooptaBlockData, YooptaContentValue, YooptaPath } from './editor/types'; export type YooptaOnChangeOptions = { operations: YooptaOperation[]; }; export type RenderBlockProps = { block: YooptaBlockData; children: ReactNode; blockId: string; }; export type YooptaEditorProps = { editor: YooEditor; onChange?: (value: YooptaContentValue, options: YooptaOnChangeOptions) => void; onPathChange?: (path: YooptaPath) => void; autoFocus?: boolean; className?: string; children?: React.ReactNode; placeholder?: string; style?: CSSProperties; /** Custom render wrapper for each block. Useful for drag-and-drop integration. */ renderBlock?: (props: RenderBlockProps) => ReactNode; }; declare const YooptaEditor: ({ editor, autoFocus, className, children, placeholder, style, onChange, onPathChange, renderBlock, }: YooptaEditorProps) => import("react/jsx-runtime").JSX.Element; export { YooptaEditor }; //# sourceMappingURL=yoopta-editor.d.ts.map