Read text from clipboard.
read_clipboard(which = "tcltk") read_clipboard_clipr() read_clipboard_tcltk()
| which | (string) either |
|---|
read_clipboard() and read_clipboard_tcltk() return a string from
clipboard. If the clipboard contains non-sting object, empty sting ("")
is returned.
read_clipboard_clipr() uses clipr implementation.
Encoding issues may occur on Windows.
read_clipboard_tcltk() uses Tcl/Tk implementation of clipboard.
Tcl/Tk clipboard gets empty, if is window gets closed.
The functions in all cases must return a single string. Possible different conditions on clipboard:
one line of text;
several lines of text;
non-text object.