Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Block Patterns – Copy to Clipboard Button

  • Hi support,

    After following a tutorial to create a copy to clipboard button so people can copy block patterns to their clipboard, I’ve ended up, instead, with a mental block.

    I’m following this tutorial by Sridhar Katakam – https://brickslabs.com/copy-to-clipboard-button-for-sharing-your-bricks-designs/ – and adapting it to GenerateBlocks/GeneratePress.

    The part I’m struggling to figure out is the last part in the tutorial.

    It’s where the data attribute’s value Gets the ACF text value. The ACF text field has been created, and Sridhar’s bricks_code has been replaced with another field name.

    Then the script with the bl_get_cf() function and data-code attribute value – {echo:bl_get_cf()} – has been added.

    This doesn’t seem to Get the text entered into the post_meta’s custom text field. Instead, it simply copies the value of the data attribute to the clipboard.

    Is something wrong being done here or is their something you can see that’s missing?

    The goal would be to copy the block pattern JSON entered into an ACF custom text field to the clipboard.

    Thank you for any insight, and best regards,

    Paul

  • Hi Paul,

    Unfortunately we cannot support this type of custom solution in this forum:
    https://generate.support/what-support-includes/

    I would recommend commenting on that article you found and see if the author is able to provide some suggestions.

    Thanks for your understanding 🙂

  • Hi Leo,

    I understand.

    It was more to check if there is something obvious I was missing in GeneratePress/GenerateBlocks. I’ll head in another direction.

    Thank you,

    Paul

  • No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Block Patterns – Copy to Clipboard Button’ is closed to new replies.