The lives in the future and must be imported for use.
set(contentstringflavorstring) stringWrites data from Jetpack to the clipboard. This is the recommended method of copying data to the clipboard.
contentThe content to be copied to the clipboard. If no other arguments are specified, the flavor of the content is assumed to 'plain'.string
flavorData type. This is an optional parameter. The only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is HTML).string"text"
Here's an example of how to use the method to set the clipboard.
// In text format
// In other clipboard
get(flavor string)Returns data to Jetpack from the clipboard. If flavor is provided, the data is returned in that format.
flavorReturns data to Jetpack from the clipboard. If flavor is provided, the data is returned in that format. string
Here's an example of how to use the method to get the data on the clipboard. Remember to import clipboard from the future before calling it.
var myContent = "<i>This is some italic text</i>";
jetpack.clipboard.set( myContent, "html" );
getCurrentFlavors()Returns an array of available Jetpack clipboard flavors, for the current system clipboard state.