@kedao/editor
Version:
Rich Text Editor Based On Draft.js
55 lines (54 loc) • 2.19 kB
TypeScript
import React from 'react';
import { EditorState } from 'draft-js';
import 'draft-js/dist/Draft.css';
import 'assets/scss/_base.scss';
declare class KedaoEditor extends React.Component<any, any> {
editorProps: any;
editorDecorators: any;
controlBarInstance: any;
isFocused: boolean;
isLiving: boolean;
finder: any;
valueInitialized: boolean;
containerNode: any;
draftInstance: any;
constructor(props: any);
UNSAFE_componentWillMount(): void;
componentDidMount(): void;
UNSAFE_componentWillReceiveProps(props: any): void;
componentDidUpdate(prevProps: any, prevState: any): void;
componentWillUnmount(): void;
getEditorProps(props?: Readonly<any> & Readonly<{
children?: React.ReactNode;
}>): any;
onChange: (editorState: any, callback?: any) => void;
getDraftInstance: () => any;
getFinderInstance: () => any;
getValue: () => any;
setValue: (editorState: any, callback?: any) => void;
forceRender: () => void;
onTab: (event: any) => void;
onFocus: () => void;
onBlur: () => void;
requestFocus: () => void;
handleKeyCommand: (command: any, editorState: any) => "handled" | "not-handled";
handleReturn: (event: any, editorState: any) => "handled" | "not-handled";
handleBeforeInput: (chars: any, editorState: any) => "handled" | "not-handled";
handleDrop: (selectionState: any, dataTransfer: any) => "handled" | "not-handled";
handleDroppedFiles: (selectionState: any, files: any) => "handled" | "not-handled";
handlePastedFiles: (files: any) => "handled" | "not-handled";
handleCopyContent: (event: any) => void;
handlePastedText: (text: any, html: any, editorState: any) => false | "handled";
handleCompositionStart: (event: any) => void;
undo: () => void;
redo: () => void;
removeSelectionInlineStyles: () => void;
insertHorizontalLine: () => void;
clearEditorContent: () => void;
toggleFullscreen: (fullscreen: any) => void;
lockOrUnlockEditor(editorLocked: any): void;
setEditorContainerNode: (containerNode: any) => void;
render(): JSX.Element;
}
export default KedaoEditor;
export { EditorState };