JSFiddle - React, Tailwind, and code Playground
HTML
<div id="var1" class="insert">Name</div>
<div id="var2" class="insert">Street address</div>
<textarea id="targetText">some text already here</textarea>
JavaScript
$('.insert').click(function(e){
var tav = $('#targetText').val(),
strPos = $('#targetText')[0].selectionStart;
front = (tav).substring(0,strPos),
back = (tav).substring(strPos,tav.length);
$('#targetText').val(front + '{' + $(this).text() + '}' + back);
});