variable to clipboard

mbuitenkamp-4316
Community Member Posts: 12
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

0
Comments
-
wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 504 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)0 -
Thank you for wanting to help!
However, when I import the pkg, all I see is a blank page?0 -
wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 504 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
Joe0 -
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???0 -
-
found it!
it was actually just a matter of making the 'Set To Update Clipboard' to multiline as well.
Yay, I'm so happy!
thank you0 -
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?
tia0 -
wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 504 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
Joe0 -
perfect!
thanks a million0
So You Wanna Be An eLearning ROCKSTAR?
Categories
- 4.4K All Categories
- 35 ✫ Announcements
- 5 ✪ Contests
- 33.6K eLearning Brothers® Products
- 33.2K Lectora®
- 31.3K Lectora Discussions
- 1.9K Lectora Feature Requests
- 56 Lectora User Groups
- 2 AssetLibrary™
- AssetLibrary Discussions
- 2 AssetLibrary Feature Requests
- 221 CenarioVR®
- 122 CenarioVR Discussions
- 99 CenarioVR Feature Requests
- 2 Rockstar Learning Platform®
- 1 Rockstar Learning Platform Discussions
- 1 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
- 108 CourseMill®
- 101 CourseMill Discussions
- 40 ReviewLink®
- 28 ReviewLink Discussions
- 12 ReviewLink Suggestions
- 1 The Training Arcade®
- 1 The Training Arcade Discussions
- The Training Arcade Feature Requests
- 7 Additional Learning Products
- 2 Adobe®
- 2 Articulate®
- 1 Camtasia®
- Docebo®
- 1 iSpring®
- 1 Microsoft® PowerPoint®
- 892 All Things eLearning
- 3 Course Development Showcase
- 1 eLearning Brothers® Downloads
- 1 Compliance Training
- 5 eLearning Development
- eLearning Game Design
- 7 Instructional Design
- 544 Learning Management System (LMS) Integration
- 2 Mobile Learning
- 2 Visual Design
- 323 Web Accessibility
- 1.2K ♪ The Green Room
- 3 ♡ Community Feedback
- 7 Community Tips