Merge branch 'main' of http://113.45.157.195:3003/insiinc/re-mooc
This commit is contained in:
commit
53e203e968
|
@ -62,16 +62,16 @@ export default function MindEditor({ id }: { id?: string }) {
|
|||
});
|
||||
const { handleFileUpload } = useTusUpload();
|
||||
const [form] = Form.useForm();
|
||||
const CustomLinkIconPlugin = (mind) => {
|
||||
mind.bus.addListener("operation", async () => {
|
||||
const hyperLinkElement =
|
||||
await document.querySelectorAll(".hyper-link");
|
||||
console.log("hyperLinkElement", hyperLinkElement);
|
||||
hyperLinkElement.forEach((item) => {
|
||||
const hyperLinkDom = createRoot(item);
|
||||
hyperLinkDom.render(<LinkOutlined />);
|
||||
});
|
||||
const handleIcon = () => {
|
||||
const hyperLinkElement =document.querySelectorAll(".hyper-link");
|
||||
console.log("hyperLinkElement", hyperLinkElement);
|
||||
hyperLinkElement.forEach((item) => {
|
||||
const hyperLinkDom = createRoot(item);
|
||||
hyperLinkDom.render(<LinkOutlined />);
|
||||
});
|
||||
}
|
||||
const CustomLinkIconPlugin = (mind) => {
|
||||
mind.bus.addListener("operation", handleIcon)
|
||||
};
|
||||
useEffect(() => {
|
||||
if (post?.id && id) {
|
||||
|
@ -133,7 +133,11 @@ export default function MindEditor({ id }: { id?: string }) {
|
|||
containerRef.current.hidden = true;
|
||||
//挂载实例
|
||||
setInstance(mind);
|
||||
|
||||
}, [canEdit]);
|
||||
useEffect(() => {
|
||||
handleIcon()
|
||||
});
|
||||
useEffect(() => {
|
||||
if ((!id || post) && instance) {
|
||||
containerRef.current.hidden = false;
|
||||
|
@ -204,7 +208,7 @@ export default function MindEditor({ id }: { id?: string }) {
|
|||
}
|
||||
console.log(result);
|
||||
},
|
||||
(error) => {},
|
||||
(error) => { },
|
||||
`mind-thumb-${new Date().toString()}`
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue