mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
clipper: set full src url on image.src
This commit is contained in:
@@ -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