If I have e.g. 20 lines of text, e.g.
<p class="textlist">Cheese</p>
<p class="textlist">Water</p>
<p class="textlist">Earth</p>
<p class="textlist">Helicopter</p>
<p class="textlist">Rabbit</p>
I wondered if anyone might be able to advise please, how I might be able to have a button on the page which a user can click, which copies the text values to the clipboard, so that all the user gets in their clipboard are the p innerHTML values in a list split by line breaks, e.g.
Cheese
Water
Earth
Helicopter
Rabbit
The example above is just a simple example, rather than the finished product I'l be working with, just something to use as an example to demonstrate the point.
I was thinking it might be possible using Javascript / jQuery / accessing the DOM, but I don't know how one would do it.