mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix: rich-text support modules and formats props
This commit is contained in:
parent
bd077d5cc2
commit
04b892ff07
@ -35,13 +35,13 @@ export const RichText = connect(
|
|||||||
'link',
|
'link',
|
||||||
'image',
|
'image',
|
||||||
];
|
];
|
||||||
const { value, defaultValue, onChange, disabled } = props;
|
const { value, defaultValue, onChange, disabled, modules: propsModules, formats: propsFormats } = props;
|
||||||
const resultValue = isVariable(value || defaultValue) ? undefined : value || '';
|
const resultValue = isVariable(value || defaultValue) ? undefined : value || '';
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
<ReactQuill
|
<ReactQuill
|
||||||
className={`${componentCls} ${hashId}`}
|
className={`${componentCls} ${hashId}`}
|
||||||
modules={modules}
|
modules={propsModules || modules}
|
||||||
formats={formats}
|
formats={propsFormats || formats}
|
||||||
value={resultValue}
|
value={resultValue}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
if (value === '<p><br></p>') {
|
if (value === '<p><br></p>') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user