Copy text from one element to another

Hi everyone

I’m trying to make a simple app that concatenates short pieces of text into a longer one. Ideally, the user would drag the desired text object (e.g. from a RG list) and drop it into a rich text editor (or similar), and the contents of the text would be copied into the RTE. This would then be repeated ad nauseum and to create a long bit of text from the selected short bits.

(If the drag/drop functionality is a bridge too far then I’d be happy with a button next to each short text that initiates the copy).

I’m fairly new to Bubble; I’m finding lots of tools for copying content to the clipboard, but none for pasting? Not sure if I’m just missing something obvious or completely on the wrong track.

Hoping someone can point me in the direction of where to look / what to search for.

Oh and happy new year!

Hit here, @Gargomac… if I understand your post correctly, one way you could go is to append the selected text (whether it is dragged and dropped or when a button is clicked) to a custom state’s value. I assume you would also want to append a space after the appended text so all of the shorter texts don’t run together. Then, set the initial content of the rich text editor to the custom state, and you should get the desired result.

If it helps, here is an example of what the workflow that appends the texts could look like (note that I defined the short texts in an option set).

Hope this helps.

Best…
Mike

1 Like

Hi,

Adding to @mikeloc ‘s solution - perfectly viable - and only with respect to the drag and drop aspect of your question, this is possible, here is the documentation for corresponding bubble drag and drop plugin : https://manual.bubble.io/core-resources/bubble-made-plugins/draggable-ui-elements

Regards

1 Like

Ah custom states - that makes sense. Thanks @mikeloc you’re a legend.

1 Like

Thanks @cynthia.conrad1 this is great.

This topic was automatically closed after 70 days. New replies are no longer allowed.