I use jquery in twig to add a variable to a textarea.
the text should be in this form: {{ variable }}
for example
$('#message').change(function(){
var c= $("#message option:selected").text();
// I will add this variable to the text area in the form {{ +c+ }}
// $('#textarea').val(c );
});
in the picture when i clic to nom, this nom should be added to the text with {{nom}} form and not just nom
I tried this code baut does not work
$('#textarea').val("{{"+c+"}}" );
any help please
