mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-23 23:35:57 +02:00
Fix pasted images disappearing when switching to source mode (#87)
This commit is contained in:
@@ -4620,17 +4620,15 @@
|
|||||||
// Switching TO source: fix blob images first, then extract markdown
|
// Switching TO source: fix blob images first, then extract markdown
|
||||||
if (hasPendingBlobs) {
|
if (hasPendingBlobs) {
|
||||||
hasPendingBlobs = false;
|
hasPendingBlobs = false;
|
||||||
fixingBlobsPromise = fixBlobImages();
|
fixBlobImages().then(() => {
|
||||||
}
|
sourceContent = editor ? editorToMarkdown() : ($activeNote?.content ?? '');
|
||||||
const doSwap = () => {
|
resetSourceHistory(sourceContent);
|
||||||
|
lastSourceMode = true;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
sourceContent = editor ? editorToMarkdown() : ($activeNote?.content ?? '');
|
sourceContent = editor ? editorToMarkdown() : ($activeNote?.content ?? '');
|
||||||
resetSourceHistory(sourceContent);
|
resetSourceHistory(sourceContent);
|
||||||
lastSourceMode = true;
|
lastSourceMode = true;
|
||||||
};
|
|
||||||
if (fixingBlobsPromise) {
|
|
||||||
fixingBlobsPromise.then(doSwap);
|
|
||||||
} else {
|
|
||||||
doSwap();
|
|
||||||
}
|
}
|
||||||
} else if (!isSource && lastSourceMode) {
|
} else if (!isSource && lastSourceMode) {
|
||||||
lastSourceMode = false;
|
lastSourceMode = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user