Interaction - target actual content (innerHTML)

Possible options/actions:

  • select /highlight (all)
  • copy
  • etc.

Useful for

  • sharing current page URL, in addition to the link wrapper share actions (e.g. from an input field where the current page URL is dynamically created)
  • share content, e.g. code (HTML, CSS, JS,…), paragraphs, etc. you post on your page
  • etc.

Just target the selector of your desired content.
Visual indicators to show the user that the content was successfully copied could be created also with interactions.
Or just select/highlight all content after the click to give visual feedback with an additional interaction rule.

Also in combination with something like this:

Just an idea I got when I thought how to implement properly a “share current url” copy to clipboard option, since this is something that is missing in terms of sharing your content.

3 Likes