How to use the clipboard.readText function in clipboard

To help you get started, we’ve selected a few clipboard examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jam3 / hihat / test / fixtures / test-electron-builtins.js View on Github external
var clipboard = require('clipboard')
process.stdout.write(clipboard.readText() + '\n')

window.close()

// var clipboard = require('clipboard')

// var image = clipboard.readImage()
// var buffer = image.toPng()
// process.stdout.write(buffer)

// // close window
// window.close()
github Bahlaouane-Hamza / Yays / main.js View on Github external
var ret = globalShortcut.register(process.platform === 'win32' ? 'ctrl+g' : 'cmd+g', function() {
    console.log('cmd+g/ctrl+g is pressed');
    console.log(clipboard.readText('selection'));
    var url = clipboard.readText('selection');
    mainWindow.webContents.executeJavaScript("addNewURL('"+url+"');");
  });
github Bahlaouane-Hamza / Yays / main.js View on Github external
var ret = globalShortcut.register(process.platform === 'win32' ? 'ctrl+g' : 'cmd+g', function() {
    console.log('cmd+g/ctrl+g is pressed');
    console.log(clipboard.readText('selection'));
    var url = clipboard.readText('selection');
    mainWindow.webContents.executeJavaScript("addNewURL('"+url+"');");
  });
github mafintosh / playback / index.js View on Github external
click: function () {
      ipc.emit('add-to-playlist', clipboard.readText().split('\n'))
    }
  }))
github mohsen1 / fb-photo-fetch / app.js View on Github external
function paste() {
    $scope.token = clipboard.readText();
  };
github hirokidaichi / guiflow / js / editor.js View on Github external
paste: waitEditorReady.and(function() {
        var text = clipboard.readText();
        editor.insert(text);
    }),
    selectAll: waitEditorReady.and(function() {
github pcman-bbs / plasmon / app.js View on Github external
click: function() {
					pcman.conn.convSend(clipboard.readText());
				}
			},