Perform copy and paste operations on the system clipboard.
Process: Main, Renderer
Additionally, you can define a data-clipboard-action attribute to specify if you want to either copy or cut content. If you omit this attribute, copy will be used by default. Mussum ipsum cacilds, vidis litro abertis.
On Linux, there is also a selection
clipboard. To manipulate ityou need to pass selection
to each method:
The clipboard
module has the following methods:
Note: Experimental APIs are marked as such and could be removed in future.
clipboard.readText([type])
type
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Returns String
- The content in the clipboard as plain text.
clipboard.writeText(text[, type])
text
Stringtype
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Writes the text
into the clipboard as plain text.
clipboard.readHTML([type])
type
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Returns String
- The content in the clipboard as markup.
clipboard.writeHTML(markup[, type])
markup
Stringtype
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Writes markup
to the clipboard.
clipboard.readImage([type])
type
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Returns NativeImage
- The image content in the clipboard.
clipboard.writeImage(image[, type])
image
NativeImagetype
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Writes image
to the clipboard.
clipboard.readRTF([type])
type
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Returns String
- The content in the clipboard as RTF.
clipboard.writeRTF(text[, type])
text
Stringtype
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Writes the text
into the clipboard in RTF.
clipboard.readBookmark()
macOSWindowsReturns Object
:
title
Stringurl
StringReturns an Object containing title
and url
keys representing the bookmark inthe clipboard. The title
and url
values will be empty strings when thebookmark is unavailable.
clipboard.writeBookmark(title, url[, type])
macOSWindowstitle
Stringurl
Stringtype
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Writes the title
and url
into the clipboard as a bookmark.
Note: Most apps on Windows don't support pasting bookmarks into them soyou can use clipboard.write
to write both a bookmark and fallback text to theclipboard.
clipboard.readFindText()
macOSReturns String
- The text on the find pasteboard, which is the pasteboard that holds information about the current state of the active application’s find panel.
This method uses synchronous IPC when called from the renderer process.The cached value is reread from the find pasteboard whenever the application is activated.
clipboard.writeFindText(text)
macOStext
StringWrites the text
into the find pasteboard (the pasteboard that holds information about the current state of the active application’s find panel) as plain text. This method uses synchronous IPC when called from the renderer process.
clipboard.clear([type])
type
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Clears the clipboard content.
clipboard.availableFormats([type])
type
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Returns String[]
- An array of supported formats for the clipboard type
.
clipboard.has(format[, type])
Experimentalformat
Stringtype
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Returns Boolean
- Whether the clipboard supports the specified format
.
clipboard.read(format)
Experimentalformat
StringReturns String
- Reads format
type from the clipboard.
clipboard.readBuffer(format)
Experimentalformat
StringReturns Buffer
- Reads format
type from the clipboard.
clipboard.writeBuffer(format, buffer[, type])
Experimentalformat
Stringbuffer
Buffertype
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Writes the buffer
into the clipboard as format
.
clipboard.write(data[, type])
data
Objecttext
String (optional)html
String (optional)image
NativeImage (optional)rtf
String (optional)bookmark
String (optional) - The title of the URL at text
.type
String (optional) - Can be selection
or clipboard
; default is 'clipboard'. selection
is only available on Linux.Writes data
to the clipboard.
I’m very excited to announce that the Flow designer now allows you to copy and paste actions!
This has been one of the most desired features which our users have been asking for and it is finally here.
In this post, I will share how to use the Clipboard, along with some tips and tricks so that you can cut the amount of time it takes for you to build flows.
In the Flow designer – you will notice we have added a new tab called “My clipboard” – this is where all the actions you copy will be stored.
To add any action to the clipboard – click on the “…” icon and select “Copy to my clipboard” option
To paste / re-use the action – simply add the action, as you would add any other action, by selecting the “My clipboard” tab and selecting the copied action
You can also paste / re-use actions across flows! This feature does not, I repeat does NOT, limit you to using the copied actions in one flow.
If you want to copy multiple actions in one go – use “Scope”. You can do this by adding a “Scope” step to your flow, then drag and drop the actions you’d like to copy into the Scope step. Finally add the “Scope” to the clipboard.
If you’re an advanced user and would like to view the “code” of your copied action – hover on the “info” bubble and you can see what’s in the copied action.
And finally – there is another very cool feature built into “My clipboard” for all the flow-hackers reading this post, who’d like to share components of their flow offline.
You can access the “code” snippet of an action by opening Notepad and pressing CTRL+V, after you have copied it to a clipboard, then click on “My clipboard” and press CTRL+V and watch as your “code” snippet gets automatically converted to step you can use in any of your flows.
Here is a sample for you to try out. Copy the below code and navigate to “My Clipboard” and press CTRL+V
You should see the following action show up in your clipboard
In addition to Clipboard support, we have also introduced a few user experience updates in the last few months, that will make it easier for you to create, manage and run your flows
These new create experiences make it easy for you to start off your flow. You can find them under the +New option on the My flows tab.
For instance, if you want to create a Scheduled flow that runs only on weekdays – you can set it up as shown below
The new details page is cleaner and streamlined. It optimizes screen real estate, as well as provides more information on your flow.
We have also updated the run flow experience. The new “run flow” experience uses modern controls to collect inputs from users running your flow and allows you to quickly review connections and actions used in the flow for the added peace of mind.
That’s it from me for in this post. Looking forward to your feedback and comments!