I have been reading through a few pages in order to figure out how to insert the content from a html tag into a textarea element.
I have found a page with an example here on stackoverflow which I tried to modify, however since I'm not experienced in using jquery I (of course) quickly ran into trouble ! because I simply don't know how to "connect" a click-event on a html tag with an event which inserts the content from a html tag for example:
<p>something</p>
into a textarea element.
Here is what I have so far:
$("p").click(function() {
$(this).
$("textarea").insertAtCaret('text');
and the main issue is what write after:
$(this).????
I have made a jsfiddle where my project is shown
I hope that someone would be so kind as to help me out or at least point me in the right direction - thank you in advance :o)
and add it to your textarea?
– Arya Aghaei Dec 17 '17 at 08:14