From 578e548883b1e7c7772037e8202059d328b2345a Mon Sep 17 00:00:00 2001 From: quenousimporte <76260127+quenousimporte@users.noreply.github.com> Date: Mon, 30 Jan 2023 10:16:07 +0100 Subject: [PATCH] added: comment selection (html tags) --- main.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 296f70d..93ad338 100644 --- a/main.js +++ b/main.js @@ -313,6 +313,10 @@ var commands = [ { hint: "Include subnote", action: includesub +}, +{ + hint: "Comment selection", + action: comment }]; var snippets = [ @@ -376,7 +380,16 @@ function createsubnote() + md.value.substring(range.end); datachanged(); } - }) + }); +} + +function comment() +{ + md.value = md.value.substring(0, md.selectionStart) + + "" + + md.value.substring(md.selectionEnd); } function includesub()