///
import { Descendant, Editor, Node, Path } from 'slate';
import { CustomElement, ITagRule, InsertNodesOptions, WrapNodesOptions } from './types';
export interface EditorProps {
value?: string;
wordLimit?: number;
disabled?: boolean;
onChange?: (value?: string) => void;
className?: string;
tagRules?: ITagRule[];
onBlur?: () => void;
onFocus?: () => void;
placeholder?: string;
onKeyDown?: (val: any) => void;
variables?: Array<{
code: string;
label?: string;
}>;
contentClassName?: string;
renderVarLabel?: (code: string) => React.ReactNode;
}
export interface EditorRefProps {
editor: Editor;
getEditorValue: () => string;
_insertNodes: (element?: CustomElement, options?: InsertNodesOptions) => void;
_wrapNodes: (element?: CustomElement, options?: WrapNodesOptions) => void;
_setNodes: (nodeProps: Partial, options: {
at: Path;
}) => void;
_setEditorContent: (nodes?: Node[]) => void;
_findNodePath: (ele?: Node) => Path | undefined;
_serialize: (value: Descendant[], options?: any) => string;
_generateTextBySelection: (options?: any) => string | null;
_insertFragment: (val: string, forceRemove: boolean) => void;
_setEditorContentByStr: (val: string) => void;
}
declare const SlateEditor: import("react").ForwardRefExoticComponent>;
export default SlateEditor;
export declare let isInputChinese: boolean;