readText, readHTML returns Promise!
See Electron Documentation for clipboard for details
'use strict'
module.exports = (pluginContext) => {
const clipboard = pluginContext.clipboard;
function startup() { ... }
function search(query, res) { ... }
function execute(id, payload) {
clipboard.readText().then((result) => {
console.log('Text from clipboard: ' + result);
});
}
return { startup, search, execute };
};