|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
|
import { App, ConfigProvider, Button, Form, Input, Flex, Checkbox, Popconfirm, Select, Space, Upload, Divider } from 'antd';
|
|
|
|
|
import { App, ConfigProvider, Button, Form, Input, Flex, Checkbox, Popconfirm, Select, Space, Upload, Divider, Modal } from 'antd';
|
|
|
|
|
import { UploadOutlined, LoadingOutlined } from '@ant-design/icons';
|
|
|
|
|
import '@dckj/react-better-modal/dist/index.css';
|
|
|
|
|
import DnDModal from '@/components/DndModal';
|
|
|
|
@ -314,7 +314,8 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, fromOrder, toEma
|
|
|
|
|
win.document.body.appendChild(iframe);
|
|
|
|
|
win.document.body.style.margin = '0';
|
|
|
|
|
} else if (file.type === 'application/pdf') {
|
|
|
|
|
win.document.write("<iframe src='" + e.target.result + "' width='100%' height='100%' style=\"border:none\"></iframe>");
|
|
|
|
|
// win.document.write("<iframe src='" + e.target.result + "' width='100%' height='100%' frameborder=\"0\"></iframe>");
|
|
|
|
|
win.document.write("<embed src='" + e.target.result + "' width='100%' height='100%' style=\"border:none\"></embed>");
|
|
|
|
|
win.document.body.style.margin = '0';
|
|
|
|
|
} else if (file.type.startsWith('audio/')) {
|
|
|
|
|
win.document.write("<audio controls src='" + e.target.result + "'></audio>");
|
|
|
|
@ -557,7 +558,6 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, fromOrder, toEma
|
|
|
|
|
</Form>
|
|
|
|
|
<LexicalEditor {...{ isRichText }} onChange={handleEditorChange} defaultValue={initialContent} />
|
|
|
|
|
</DnDModal>
|
|
|
|
|
|
|
|
|
|
</ConfigProvider>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|