import React, { Component } from 'react'; import 'braft-editor/dist/index.css'; import './index.less'; export interface IEditorProps { /** * 富文本的值 */ value?: string; /** * wos上传文件方法 */ uploadFile?: (p: any) => void; /** * 文本改变事件 */ onChange?: (p: any) => T; /** * 样式 */ style?: React.CSSProperties; contentStyle?: React.CSSProperties; contentClassName: string; /** * 扩展组件 */ component?: {}; /** * 类名 */ className?: string; extendControls?: []; excludeControls?: []; /** * 富文本需要显示的功能按钮 */ controls?: Array; /** * 默认是 BraftEditor类型 */ defaultValue?: string; /** * 富文本的宽度 * */ width?: number; /** * 富文本的高度 * */ height?: number; /** * 是否清除复制的文本格式 默认为false * */ clearFormat?: boolean; } /** * 非受控编辑器 */ declare class Editor extends Component { editorInstance: any; constructor(props: any, context: any); triggerOnChange: () => void; handleEditorChange: (editorState: any) => void; isEmpty(): any; insertHTML(html: any): void; onPaste: (e: any) => boolean; render(): JSX.Element; } export default Editor;