Closed goudanz closed 3 years ago
like this:
https://braft.margox.cn/demos/custom
const controls = [
'undo', 'redo', 'headings', 'separator','text-color', 'bold', 'separator', 'text-indent', 'text-align', 'separator',
'list-ul', 'list-ol', 'blockquote', 'code', 'separator','link', 'media', 'separator','clear'
]
<BraftEditor
style={{border: '1px solid #d1d1d1',borderRadius: '2px',height: 400}}
contentStyle={{height: 306, overflowY: 'scroll'}}
controls={controls}
extendControls={extendControls}
value={editor}
defaultValue={defaultValue}
media={{uploadFn: myUploadFn}}
onChange={onEditorContentChange}
onFocus={onFocus}
/>
thanks,I know the solution.
i found the way from here : https://github.com/uiwjs/react-md-editor/issues/213#issuecomment-885726737
I want to do this.
eg:
const commands = ['bold','codeBlock','link','code','image'];
When I set this up, only these are displayed in the toolbar!