Copy texts to clipboard via JavaScript (ES6)
$ npm install clipboard-plus
Add the paths to configuration:
const copy = require('clipboard-copy');
let node = document.querySelector('#content');
copy(node);
or
const copy = require('clipboard-copy');
copy('this is the copied content');
clipboard-plus is available under the terms of the MIT license.