added: comment selection (html tags)
This commit is contained in:
parent
32f17ba99e
commit
578e548883
15
main.js
15
main.js
|
@ -313,6 +313,10 @@ var commands = [
|
||||||
{
|
{
|
||||||
hint: "Include subnote",
|
hint: "Include subnote",
|
||||||
action: includesub
|
action: includesub
|
||||||
|
},
|
||||||
|
{
|
||||||
|
hint: "Comment selection",
|
||||||
|
action: comment
|
||||||
}];
|
}];
|
||||||
|
|
||||||
var snippets = [
|
var snippets = [
|
||||||
|
@ -376,7 +380,16 @@ function createsubnote()
|
||||||
+ md.value.substring(range.end);
|
+ md.value.substring(range.end);
|
||||||
datachanged();
|
datachanged();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function comment()
|
||||||
|
{
|
||||||
|
md.value = md.value.substring(0, md.selectionStart)
|
||||||
|
+ "<!-- "
|
||||||
|
+ md.value.substring(md.selectionStart, md.selectionEnd)
|
||||||
|
+ " -->"
|
||||||
|
+ md.value.substring(md.selectionEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
function includesub()
|
function includesub()
|
||||||
|
|
Loading…
Reference in New Issue