mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
Merge pull request #9037 from streetwriters/fix-clipper-images
Fix loading images in clipped pages
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -34,10 +34,7 @@ export default defineConfig({
|
||||
js: "clipper.bundle.js"
|
||||
},
|
||||
distPath: {
|
||||
root: path.resolve(
|
||||
__dirname,
|
||||
"../../apps/mobile/native/ios/extension.bundle"
|
||||
)
|
||||
root: path.resolve(__dirname, "../../apps/mobile/ios/extension.bundle")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,9 +26,13 @@ type CloneNodeOptions = {
|
||||
|
||||
export function cloneNode(node: HTMLElement, options: CloneNodeOptions) {
|
||||
node = node.cloneNode(true) as HTMLElement;
|
||||
const images = node.querySelectorAll("img");
|
||||
if (!options.images) {
|
||||
const images = node.getElementsByTagName("img");
|
||||
for (const image of images) image.remove();
|
||||
} else {
|
||||
for (const image of images) {
|
||||
image.src = image.currentSrc;
|
||||
}
|
||||
}
|
||||
|
||||
if (!options.styles) {
|
||||
|
||||
Reference in New Issue
Block a user