import React from 'react'; import { BarftEditorPage, BaseEditorProps } from "@components/Editor/BraftEditor"; import { ControlsToolBar, ToolListItem } from "@components/Editor/CommonTool/ControlsToolBar"; import { ContentUtils } from "braft-utils"; import styles from './index.less'; interface SimpleEditorProps extends BaseEditorProps { toolAlign?: 'inner' | 'bottom' | 'both'; toolList?: Array; injectControlsToolBar?: any; injectBraftEditorProps?: any; toolBarContainerStyle?: any; appendToolBtn?: any; appendInnderBar?: any; } const SimpleEditor = (props: SimpleEditorProps) => { const { value, onChange, toolAlign = 'inner', toolList = [], injectControlsToolBar = {}, toolBarContainerStyle = {}, injectBraftEditorProps = {}, appendToolBtn = null, appendInnderBar = null, } = props; if (toolAlign === 'inner') { return ( ( ) } {...injectBraftEditorProps} /> ) } if (toolAlign === 'both') { return (
appendInnderBar} {...injectBraftEditorProps} />
{appendToolBtn}
) } return (
{appendToolBtn}
); } export default SimpleEditor;