This commit is contained in:
mike12345567 2020-10-27 13:25:12 +00:00
parent e26f272746
commit 87175e70cf
1 changed files with 4 additions and 3 deletions

View File

@ -26,9 +26,10 @@
const position = getCaretPosition()
const toAdd = `{{ ${binding.path} }}`
if (position.start) {
value = value.substring(0, position.start)
+ toAdd
+ value.substring(position.end, value.length);
value =
value.substring(0, position.start) +
toAdd +
value.substring(position.end, value.length)
} else {
value += toAdd
}