How to import Clipboard.js library into Google App Script?

Viewed 631

Since manipulating clipboard is forbidden in Google App, I want to find a workaround by using Clipboard.js library.

My questions are:

1. How should I import a Clipboard.js library to Google App Script?

2. And how to call the functions in other pages (eg. trying to call the function calculateWeight() from BMI.gs in index.html?

What I've tried:

I've tried to paste the source code of the Clipboard.js into a file called Clipboard.js.html and put everything inside the tag.

What I want achieve:

Copy a text string with a click on the "COPY" button.

>>what I want to achieve

I've spent a few hours looking for solutions but still can't find related info. Any help would be greatly appreciated. Thank you!

1 Answers
Related