Code for Better Life

Code for Better Life

Copy Image in Clipbaord to Electron App

Apr 28, 20211 min read

TL;DR This function returns a code of image source. const copyImage = () => { const _ = clipboard.availableFormats('clipboard') if (_.includes('image/png') || _.includes('image/jpeg')) { return clipboard.readImage('clipboard').toDataURL() }...