mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
🎨 Internet images cannot be exported https://github.com/siyuan-note/siyuan/issues/11231
This commit is contained in:
parent
f69e776f8c
commit
dc8744a6ce
1 changed files with 10 additions and 6 deletions
|
|
@ -1303,7 +1303,10 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
||||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||||
openMenu(protyle.app, imgSrc, false, false);
|
openMenu(protyle.app, imgSrc, false, false);
|
||||||
}
|
}
|
||||||
window.siyuan.menus.menu.append(new MenuItem(exportAsset(imgElement.getAttribute("data-src"))).element);
|
const dataSrc = imgElement.getAttribute("data-src");
|
||||||
|
if (dataSrc && dataSrc.startsWith("assets/")) {
|
||||||
|
window.siyuan.menus.menu.append(new MenuItem(exportAsset(dataSrc)).element);
|
||||||
|
}
|
||||||
if (protyle?.app?.plugins) {
|
if (protyle?.app?.plugins) {
|
||||||
emitOpenMenu({
|
emitOpenMenu({
|
||||||
plugins: protyle.app.plugins,
|
plugins: protyle.app.plugins,
|
||||||
|
|
@ -1935,7 +1938,7 @@ export const videoMenu = (protyle: IProtyle, nodeElement: Element, type: string)
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
const src = videoElement.getAttribute("src");
|
const src = videoElement.getAttribute("src");
|
||||||
if (src.startsWith("assets/")) {
|
if (src && src.startsWith("assets/")) {
|
||||||
subMenus.push({
|
subMenus.push({
|
||||||
type: "separator"
|
type: "separator"
|
||||||
});
|
});
|
||||||
|
|
@ -1948,16 +1951,17 @@ export const videoMenu = (protyle: IProtyle, nodeElement: Element, type: string)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const VideoSrc = videoElement.getAttribute("src");
|
if (src) {
|
||||||
if (VideoSrc) {
|
|
||||||
subMenus.push({
|
subMenus.push({
|
||||||
id: "openBy",
|
id: "openBy",
|
||||||
label: window.siyuan.languages.openBy,
|
label: window.siyuan.languages.openBy,
|
||||||
icon: "iconOpen",
|
icon: "iconOpen",
|
||||||
submenu: openMenu(protyle.app, VideoSrc, true, false) as IMenu[]
|
submenu: openMenu(protyle.app, src, true, false) as IMenu[]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
subMenus.push(exportAsset(src));
|
if (src && src.startsWith("assets/")) {
|
||||||
|
subMenus.push(exportAsset(src));
|
||||||
|
}
|
||||||
return subMenus;
|
return subMenus;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue