variable to clipboard

mbuitenkamp-4316
Community Member Posts: 15 ☆ Roadie ☆
Hi all,
I'm looking for a way to copy the text from an entryfield to the clipboard, and combine it with a little bit of text of my own.
So, someone puts text in entryfield_1, that text gets stored in variable_1, and then with an onMouseClick I want that text and my own text copied to the clipboard, so it can be pasted into a document.
Any way of doing this?
Cheers in advance
I'm looking for a way to copy the text from an entryfield to the clipboard, and combine it with a little bit of text of my own.
So, someone puts text in entryfield_1, that text gets stored in variable_1, and then with an onMouseClick I want that text and my own text copied to the clipboard, so it can be pasted into a document.
Any way of doing this?
Cheers in advance

Comments
-
wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 642 eLearning ROCKSTAR Admin TeamI've recently done something similar. I'm including an example that has a button and an entry field.
It puts content into the entry field using a Change Contents action, then it runs some JavaScript to copy it to the clipboard.
Hopefully it will be easy to understand, you need to Page Preview or Publish it for it to work.
- Joe
@mbuitenkamp.4316 (see the post below) -
-
wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 642 eLearning ROCKSTAR Admin TeamIt was blank, not sure how that happened.
It also needed some updates, so it's a good thing. It will work on either Desktop or Online now.
Thanks
Joe -
awesome!! I got it to work in my document! Thank you!
but... (of course there's a but), I need the entryfield to be multiline since we're asking users to create a list.
that isn't a problem, until I paste the contents from the clipboard and the neat little list just ends up as one very long single line.
so this:
item 1
item 2
item 3
becomes this:
item 1item 2item 3
Can that be fixed??? -
edited to match my document, so you can see what's going on
-
-
okay, last question:
it works when the entryfield is single line, but it doesn't work when the entryfield is multiline
The variable gets set into the entryfield for copy, but in multiline the text doesn't get selected, and so it doesn't get copied.
Which is a shame because I really do need a multiline solution.
Any idea how to fix this?
tia -
wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 642 eLearning ROCKSTAR Admin TeamHi Tia,
That's great you are figuring it out!
You need to change the execute copy script to use 'textarea' instead of 'input' see attachment
Joe -
Categories
- 4.8K All Categories
- 6 New Feature Releases
- The Training Arcade®
- Arcades™
- 125 ✫ Announcements
- 9 ✪ Contests
- 34.1K eLearning Brothers® Products
- 33.6K Lectora®
- 31.6K Lectora Discussions
- 1.9K Lectora Feature Requests
- 71 Lectora User Groups
- 17 Asset Library
- 10 AssetLibrary Discussions
- 7 AssetLibrary Feature Requests
- 305 CenarioVR®
- 179 CenarioVR Discussions
- 126 CenarioVR Feature Requests
- 40 Rockstar Learning Platform®
- 28 Rockstar Learning Platform Discussions
- 12 Rockstar Learning Platform Feature Requests
- 4 Off-the-Shelf Course Library
- 3 Off-the-Shelf Course Library Discussions
- 1 Off-the-Shelf Course Library Feature Requests
- 114 CourseMill®
- 107 CourseMill Discussions
- 44 ReviewLink®
- 32 ReviewLink Discussions
- 12 ReviewLink Suggestions
- 2 The Training Arcade®
- 1 The Training Arcade Discussions
- 1 The Training Arcade Feature Requests
- 10 Additional Learning Products
- 2 Adobe®
- 4 Articulate®
- 2 Camtasia®
- Docebo®
- 1 iSpring®
- 1 Microsoft® PowerPoint®
- 932 All Things eLearning
- 5 Course Development Showcase
- 1 eLearning Brothers® Downloads
- 1 Compliance Training
- 11 eLearning Development
- eLearning Game Design
- 7 Instructional Design
- 545 Learning Management System (LMS) Integration
- 3 Mobile Learning
- 22 Visual Design
- 331 Web Accessibility
- 1.2K ♪ The Green Room
- 8 ♡ Community Feedback
- 7 Community Tips