Skip to content

Commit 3bb4352

Browse files
save file
1 parent 969a07b commit 3bb4352

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/editors/editor/v2.0/editor-v2.0.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@
7777

7878
window.electronAPI?.onOpenFile(async({path})=>{
7979
console.log('openfile',path);
80-
var txt = await window.electronAPI.readFile({path});
81-
console.log('txt',txt);
80+
var buf = await window.electronAPI.readFile({path});
81+
console.log('buf',buf);
82+
await window.electronAPI.writeFile({path,buf});
83+
8284
});
8385

8486

0 commit comments

Comments
 (0)