when click the on the text then the text should copy to the clipboard

Topic summary

Goal: enable click-to-copy of an offer/discount code on a Shopify page so that when users click the code text, it’s copied to the clipboard.

Context: The author shared a demo link and password. They included a Shopify Liquid snippet that iterates over section.blocks to render image-bar items with optional links and an h5 caption (cta_label) where the code text likely appears.

Current state: The provided markup shows no JavaScript or attributes to handle clipboard copying or click events. There’s no indication of how the code text is identified or targeted beyond the cta_label inside h5.

Request: Assistance implementing the click-to-copy behavior for the displayed code text within the existing Liquid structure.

Outcome: No responses or solutions yet; the issue remains open.

Notes: The code snippet is central to understanding the layout and where the code text is rendered (image-bar__caption inside image-bar__text).

Summarized with AI on February 20. AI used: gpt-5.

Hi its an offer code page ! link - https://boyodemo.myshopify.com/pages/boyo-deals
pass : boyodemo
when someone click on the code text then the code should be copied in our clipboard
liquid code below !

{% for block in section.blocks %}

{% if block.settings.link != blank %}

Please help ! anybody ?