<a href="http://example.com">
<p>select this text</p>
<img src="" alt="">
</a>
Need to be able to copy text from p tag. The problem that p and img inside a and I can't select it.
I need exactly this HTML structure, as user should be able to copy link from that block. How can I do that?
textContent
will give you all of the text within the containing element.