We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bb4352 commit b013908Copy full SHA for b013908
utils/editors/editor/v2.0/editor-v2.0.html
@@ -74,11 +74,16 @@
74
75
76
console.log(window.electronAPI);
77
+ var encoder = new TextEncoder();
78
79
window.electronAPI?.onOpenFile(async({path})=>{
80
console.log('openfile',path);
81
var buf = await window.electronAPI.readFile({path});
82
console.log('buf',buf);
83
+ var blob = new Blob([buf]);
84
+ var txt = await blob.text();
85
+ txt += '123';
86
+ var buf = encoder.encode(txt);
87
await window.electronAPI.writeFile({path,buf});
88
89
});
0 commit comments