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