richText 的 receiver 和 videoReceiver 支持配置变量

This commit is contained in:
2betop 2021-05-11 16:57:59 +08:00
parent 6300de0eff
commit 5c821c157e

View File

@ -2,7 +2,7 @@ import React from 'react';
import {FormItem, FormControlProps, FormBaseControl} from './Item';
import cx from 'classnames';
import LazyComponent from '../../components/LazyComponent';
import {noop} from '../../utils/helper';
import {tokenize} from '../../utils/tpl-builtin';
/**
* RichText
@ -153,11 +153,11 @@ export default class RichTextControl extends React.Component<
...props.options,
editorClass: props.editorClass,
placeholderText: props.translate(props.placeholder),
imageUploadURL: props.receiver,
imageUploadURL: tokenize(props.receiver, props.data),
imageUploadParams: {
from: 'rich-text'
},
videoUploadURL: props.videoReceiver,
videoUploadURL: tokenize(props.videoReceiver, props.data),
videoUploadParams: {
from: 'rich-text'
},