Skip to content

Commit ef41e8b

Browse files
save file
1 parent 3468291 commit ef41e8b

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@
7373
//:
7474

7575

76+
console.log(window.electronAPI);
77+
78+
window.electronAPI?.onOpenFile(async filePath=>{
79+
console.log('openfile',filepath);
80+
var txt = await window.electronAPI.readFile(filePath);
81+
console.log(txt);
82+
83+
});
84+
85+
86+
7687
async function init(){
7788
debug('init',version);
7889
//keydown = keydown();
@@ -117,16 +128,6 @@
117128

118129

119130

120-
console.log(window.electronAPI);
121-
122-
window.electronAPI?.onOpenFile(async filePath=>{
123-
console.log('openfile',filepath);
124-
var txt = await window.electronAPI.readFile(filePath);
125-
console.log(txt);
126-
127-
});
128-
129-
130131
}//init
131132

132133

0 commit comments

Comments
 (0)