跳到主要内容

API

Props 说明

参数说明类型默认值
value编辑框内容EditorStatenull
defaultValue编辑框默认内容EditorStatenull
placeholder占位符stringnull
id唯一标识stringnull
editorId唯一标识stringnull
readOnly只读booleanfalse
language语言'zh'、'zh-hant'、'en'、'tr'、'ru'、'jpn'、'kr'、'pl'、'fr'、'vi-vn''en'
controls工具栏控件列表ControlItem[][]
excludeControls排除内置控件列表BuiltInControlNames[]
extendControls扩展控件列表ControlItem[][]
componentBelowControlBar工具栏下方扩展区域React.ReactNodenull
media媒体选项MediaTypenull
imageControls图片操作工具栏ImageControlItem[]null
imageResizable图片是否可调整尺寸booleantrue
imageEqualRatiobooleantrue
blockRenderMapImmutable.Map | Function
blockRendererFnFunction
customStyleMapImmutable.Map | Function
customStyleFnFunction
blockStyleFnFunction
keyBindingFnFunction
textBackgroundColorboolean
allowInsertLinkTextbooleanfalse
stripPastedStylesbooleanfalse
fixPlaceholderbooleanfalse
className类名string
style内联样式React.CSSPropertiesnull
controlBarClassName工具栏类名string
controlBarStyle工具栏内联样式React.CSSPropertiesnull
contentClassName内容区类名string
contentStyle内容区内联样式React.CSSPropertiesnull
onChange变更回调(editorState: EditorState) => void
onFocus聚焦回调函数Function
onBlur失焦回调函数Function
onDeleteFunction
onSaveFunction
onFullscreenFunction
handlePastedFilesFunction
handleDroppedFilesFunction
handlePastedTextFunction
handleBeforeInputFunction
handleReturnFunction
handleKeyCommandFunction
codeTabIndentsnumber
disabled是否禁用numberfalse
extendAtomics