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
|
||||
if (hasPendingBlobs) {
|
||||
hasPendingBlobs = false;
|
||||
fixingBlobsPromise = fixBlobImages();
|
||||
}
|
||||
const doSwap = () => {
|
||||
fixBlobImages().then(() => {
|
||||
sourceContent = editor ? editorToMarkdown() : ($activeNote?.content ?? '');
|
||||
resetSourceHistory(sourceContent);
|
||||
lastSourceMode = true;
|
||||
};
|
||||
if (fixingBlobsPromise) {
|
||||
fixingBlobsPromise.then(doSwap);
|
||||
});
|
||||
} else {
|
||||
doSwap();
|
||||
sourceContent = editor ? editorToMarkdown() : ($activeNote?.content ?? '');
|
||||
resetSourceHistory(sourceContent);
|
||||
lastSourceMode = true;
|
||||
}
|
||||
} else if (!isSource && lastSourceMode) {
|
||||
lastSourceMode = false;
|
||||
|
||||
Reference in New Issue
Block a user