mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Keep track of opened documents and prepare for undo/redo
This commit is contained in:
@@ -78,7 +78,7 @@ export function SourcePanel({ spyglass, docAndNode, doCopy, doDownload, doImport
|
||||
if (!spyglass || !docAndNode) return
|
||||
try {
|
||||
const data = await parseSource(value, format)
|
||||
await spyglass.setFileContents(version, docAndNode.doc.uri, JSON.stringify(data))
|
||||
await spyglass.writeFile(version, docAndNode.doc.uri, JSON.stringify(data))
|
||||
} catch (e) {
|
||||
if (e instanceof Error) {
|
||||
e.message = `Error importing: ${e.message}`
|
||||
|
||||
Reference in New Issue
Block a user