Clipboard v0.2.1 Clipboard View Source
Copy and paste from system clipboard.
Wraps ports to system-specific utilities responsible for clipboard access. It uses the default clipboard utilities on macOS, Linux and Windows but can be configured to call any executable.
Link to this section Summary
Functions
Copy value
to system clipboard
Copy value
to system clipboard but throw exception if it fails
Return the contents of system clipboard
Return the contents of system clipboard but throw exception if it fails
Link to this section Functions
Copy value
to system clipboard.
The original value
is always returned, so copy/1
can be used in pipelines.
Examples
iex> Clipboard.copy("Hello, World!")
"Hello, World!"
iex> Clipboard.copy(["Hello", "World!"])
["Hello", "World!"]
iex> "Hello, World!" |> Clipboard.copy() |> IO.puts()
"Hello, World"
Copy value
to system clipboard but throw exception if it fails.
Identical to copy/1
, except raise an exception if the operation fails.
The operation may fail when running Clipboard on unsupported operating systems or with missing executables (check your config).
Return the contents of system clipboard.
Examples
iex> Clipboard.paste()
"Hello, World!"
Return the contents of system clipboard but throw exception if it fails.
Identical to paste/1
, except raise an exception if the operation fails.
The operation may fail when running Clipboard on unsupported operating systems or with missing executables (check your config).