Link to the plugin page: https://zeroqode.com/plugin/air-copy-to-clipboard-native-mobile-1748332022373x654400179037378800
Demo to preview the plugin:
Introduction
Air Copy to clipboard Native is a plugin for Bubble that provides native clipboard functionality for mobile applications. This plugin enables seamless text copying operations to the device clipboard without relying on browser APIs. It’s designed specifically for mobile platforms, offering a reliable way to manage clipboard content within your Bubble applications.
The plugin provides a simple visual element that can be added to your application, along with actions to copy text and clear the clipboard. It also exposes states to track the current clipboard content and operation status.
Prerequisites
This plugin is designed specifically for the mobile version of the Bubble editor. To test the plugin on your mobile device, use the TestFlight app available at:
Please note that the testing app is currently available for iOS only.
How to setup
The Air Copy to clipboard Native plugin doesn’t require any API keys or special configuration. Simply follow these steps to get started:
- Install the plugin from the Bubble plugin marketplace
- Add the “Air copy to clipboard” element to your page
- Configure the element’s initial text (optional)
- Use the provided actions and events to implement clipboard functionality in your app
Plugin Element Properties
The plugin contains an “Air copy to clipboard” visual element that can be placed on a page. This element acts as a clipboard manager for your application.
Air copy to clipboard
Fields:
Title | Description | Type |
Initial Text | Initial text for the clipboard (optional) | Text |
Element Actions
1. copyText
Copies the specified text to the clipboard.
Fields:
Title | Description | Type |
text | The text to be copied to the clipboard | Text |
2. clearClipboard
Clears the clipboard content.
Exposed states
Name | Description | Type |
currentText | The current text in the clipboard | Text |
lastOperation | The result of the last operation (“success” or “error”) | Text |
isAvailable | Availability of clipboard functions | Boolean |
Element Events
Name | Description |
onCopy | Triggered after successful text copy |
onError | Triggered when an error occurs |
Workflow example
Here’s a basic example of how to implement a “Copy to Clipboard” feature in your application:
- Add the “Air copy to clipboard” element to your page
- Create a button labeled “Copy Text”
- Add an input field where users can enter or view the text to be copied
- Set up a workflow on the button:
- When button is clicked → Run “copyText” action on the Air copy to clipboard element
- Set the “text” parameter to the value from your input field
- Add a second workflow to handle the success event:
- When “onCopy” event happens → Show a message to the user “Text copied to clipboard”
- Add a third workflow to handle errors:
- When “onError” event happens → Show an error message to the user
This basic implementation allows users to copy text from your application to their device clipboard with feedback for success or failure.