Basic copy/paste functionality question

I have (what I think should be) a simple task:

I have two datatypes—call them First and Second—each with a text field named ‘message’, displayed in two repeating groups.

So the First datatype holds a chunk of text and the Second object holds an arbitrary portion of this text.

  1. From the First RG, highlight an arbitrary portion of the text.
  2. Create a new Second obj—via one button—whose message=selected text from step 1.

It really should be just two user actions: the text selection and one button click.

Any guidance or feedback on this would be greatly appreciated!

I thought AirCopy would get me partway there, but it’s not immediately apparent how to reference a highlighted text selection—is that even supported? (also, how does one use the clipboard text yielded by AirCopy? Where’s AirPaste?)

This could even be reduced to a single generic datatype—call it Chunk—with a ‘message’ field and a list of Chunks, if that makes the approach easier.

Any assistance welcomed. I’ll write up the solution and try to make it into a free plugin if the solution has to be implemented in js.

Thank you!

/tim

Hey @tim37

I think this can help you!

That’s a pretty cool plugin, for sure. It looks like highlighted text is reproduced on the fly without any user action except for selecting the text. I’d be happy with just that functionality, tbh. I’ll take a closer look. Downside is I’d have to move this preliminary stuff over to a live app just to be able to see how it works. Also the author isn’t working on it anymore, hasn’t been for over a year and a half.

I appreciate the tip, though. Pretty unique plugin.

/tf