Create a new component Copy to Clipboard

Created on 22 March 2025, about 1 month ago

Problem/Motivation

Currently, ixm_blocks provides various useful block types, but there is no Copy to Clipboard Block. A Copy to Clipboard Block would be beneficial for allowing users to quickly copy predefined text, such as code snippets, URLs, or other important information, with a single click.

Adding this block would enhance ixm_blocks by providing an easy-to-use copy functionality, reducing the need for third-party solutions and improving the user experience.

Proposed resolution

Introduce a Copy to Clipboard Block that allows users to create a button or clickable area to copy content to the clipboard.

The block should support:

  • Customizable text or dynamic content (e.g., from fields or variables).
  • Optional labels/icons for the button.
  • Visual feedback when content is copied (e.g., tooltip, color change).

Allow users to customize the appearance (e.g., button styles, icon choices).

Remaining tasks

  • Define the structure of the Copy to Clipboard Block.
  • Develop the block functionality using JavaScript and clipboard APIs.
  • Implement styling and accessibility enhancements.
  • Provide configuration options in the UI.
  • Write tests and documentation.

User interface changes

  • A new "Copy to Clipboard" block will be available in the block selection interface.
  • Admins will be able to configure the copied text, button style, and feedback behavior.

Data model changes

  • Add a new block plugin definition for the Copy to Clipboard Block.
  • Define configuration options for copied text, button styles, and feedback effects.
Feature request
Status

Active

Version

1.1

Component

Code

Created by

🇧🇷Brazil pinesso

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024