From 1b73d010433a48081661696e6af75fbf6d309f5f Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 11 Jul 2023 18:24:30 +0200 Subject: [PATCH] node tool: editor in settings --- tools/nodeclient/app.js | 2 +- tools/nodeclient/settings.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/nodeclient/app.js b/tools/nodeclient/app.js index 1c16854..a664167 100644 --- a/tools/nodeclient/app.js +++ b/tools/nodeclient/app.js @@ -41,7 +41,7 @@ axios.post(`${settings.url}/handler.php`, fs.writeFileSync("note.md", note.content); - cp.exec("sublime_text.exe -w note.md", function (err, stdout, stderr) + cp.exec(`${settings.command} note.md`, function (err, stdout, stderr) { var newcontent = fs.readFileSync("note.md", { encoding: "utf8", flag: "r" }); diff --git a/tools/nodeclient/settings.json b/tools/nodeclient/settings.json index f2f3f5c..01c787c 100644 --- a/tools/nodeclient/settings.json +++ b/tools/nodeclient/settings.json @@ -2,4 +2,6 @@ "password": "", "url": "http://localhost:8000", "maxcount": 50 + "maxcount": 50, + "command": "sublime_text.exe -w" }