UNPKG

@edtr-io/plugin-text

Version:
27 lines 1.18 kB
import { StatefulPluginEditorProps } from '@edtr-io/core'; import * as React from 'react'; import { ValueJSON } from 'slate'; import { textState } from '.'; import { TextPluginOptions } from './types'; export declare const createTextEditor: (options: TextPluginOptions) => React.ComponentType<StatefulPluginEditorProps<import("@edtr-io/core/dist/plugin-state").StateDescriptor<ValueJSON, ValueJSON, { (): ValueJSON; value: ValueJSON; set(value: ValueJSON | ((currentValue: ValueJSON) => ValueJSON)): void; }>, SlateEditorAdditionalProps>>; export declare type SlateEditorProps = StatefulPluginEditorProps<typeof textState, SlateEditorAdditionalProps>; export interface SlateEditorAdditionalProps { name: string; insert?: (options?: { plugin: string; state?: unknown; }) => void; replace?: (options?: { plugin: string; state?: unknown; }) => void; remove?: () => void; parent?: SlateEditorAdditionalProps; mergeWithNext?: (merge: (next: ValueJSON) => void) => void; mergeWithPrevious?: (merge: (previous: ValueJSON) => void) => void; } //# sourceMappingURL=editor.d.ts.map