kedao
Version:
Rich Text Editor Based On Draft.js
25 lines (24 loc) • 957 B
TypeScript
/// <reference types="draft-js" />
import React, { CSSProperties } from 'react';
import { MediaProps, ControlItem, CommonPickerProps, EditorState, EditorMode } from '../../types';
export interface ControlBarProps extends CommonPickerProps {
className: string;
style?: CSSProperties;
allowInsertLinkText: boolean;
media: MediaProps;
controls: readonly ControlItem[];
editorId: string;
extendControls: ControlItem[];
textBackgroundColor: boolean;
onRequestFocus: () => void;
isFullscreen: boolean;
onChange: (editorState: EditorState, callback?: (state: EditorState) => void) => void;
commands: Record<string, () => void>;
mode: EditorMode;
}
interface ControlBarForwardRef {
closeFinder: () => void;
uploadImage: (file: any, callback: any) => void;
}
declare const ControlBar: React.ForwardRefExoticComponent<ControlBarProps & React.RefAttributes<ControlBarForwardRef>>;
export default ControlBar;