7.15 富文本修改
This commit is contained in:
@ -3,7 +3,7 @@ import AlertMenu from './fullScreen'
|
||||
import E from 'wangeditor';
|
||||
import { Button, message, Spin } from 'antd';
|
||||
import { pictureDisplayPath, uploadAttachmentPath } from '@/utils/DownloadUtils';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, isNotEmpty } from '@/utils/CommonUtils';
|
||||
import { createNewFileBid } from '@/services/download_';
|
||||
|
||||
interface WangType {
|
||||
@ -194,21 +194,18 @@ const BraftText: React.FC<WangType> = (props) => {
|
||||
willCreate = false;
|
||||
}
|
||||
|
||||
// 重新设置编辑器内容
|
||||
echo && editor.txt.html(echo);
|
||||
|
||||
return () => {
|
||||
// 组件销毁时销毁编辑器 注:class写法需要在componentWillUnmount中调用
|
||||
editor.destroy()
|
||||
setLoading(false);
|
||||
setContent('');
|
||||
}
|
||||
}, [echo]);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
// 重新设置编辑器内容
|
||||
value && editor.txt.html(value);
|
||||
}, [value])
|
||||
echo && editor.txt.html(echo);
|
||||
}, [echo])
|
||||
/**
|
||||
*提供给父级的内容
|
||||
**/
|
||||
|
Reference in New Issue
Block a user