You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/References/Clipboard.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ clipboard.clear();
36
36
*`type``{String}`_Optional_ the type of the data. Support `text`, `png`, `jpeg`, `html` and `rtf`. By default, `type` is set to `"text"`.
37
37
*`raw``{Boolean}`_Optional_ requiring raw image data. This option is only valid if type is `png` or `jpeg`. By default, `raw` is set to `false`.
38
38
39
-
Write `data` of `type` to the clipboard. This method will clear the clipboard and replace with the given `data`. Hence another call to this method will overwrite with the new one. To write multiple types of data to clipboard simultaneously, you will need to use [clip.set(clipboardDataList)](clipsetclipboardDataList) below.
39
+
Write `data` of `type` to the clipboard. This method will clear the clipboard and replace with the given `data`. Hence another call to this method will overwrite with the new one. To write multiple types of data to clipboard simultaneously, you will need to use [clip.set(clipboardDataList)](#clipsetclipboarddatalist) below.
40
40
41
41
!!! tip "Format of Image"
42
42
Images read or written from clipboard can be either JPEG or PNG. When `raw` is not set or set to `false`, the data is expected to be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs) encoded with Base64. When `raw` is set to `true`, the data is only the Base64 encoded image data not including the `data:<mime-type>;base64,` part.
@@ -47,7 +47,7 @@ Write `data` of `type` to the clipboard. This method will clear the clipboard an
47
47
48
48
## clip.set(clipboardDataList)
49
49
50
-
*`clipboardDataList``{Array}` Array of `clipboardData` to be written to clipboard. See [clip.set(clipboardData)](#clipsetclipboardData) and [clip.set(data, [type, [raw]])](#clipsetdata-type-raw) for detailed arguments specification.
50
+
*`clipboardDataList``{Array}` Array of `clipboardData` to be written to clipboard. See [clip.set(clipboardData)](#clipgetclipboarddata) and [clip.set(data, [type, [raw]])](#clipsetdata-type-raw) for detailed arguments specification.
51
51
52
52
Multiple types of data can be written to clipboard simultaneously with this method.
53
53
@@ -87,12 +87,12 @@ Get the data of `type` from clipboard.
87
87
88
88
## clip.get(clipboardDataList)
89
89
90
-
*`clipboardDataList``{Array}` Array of `clipboardData` for reading data from clipboard. Multiple types of data can be read from clipboard simultaneously with this method. See [clip.get(clipboardData)](#clipgetclipboardData) and [clip.get([type, [raw]])](#clipgettype-raw) for detailed arguments specification.
90
+
*`clipboardDataList``{Array}` Array of `clipboardData` for reading data from clipboard. Multiple types of data can be read from clipboard simultaneously with this method. See [clip.get(clipboardData)](#clipgetclipboarddata) and [clip.get([type, [raw]])](#clipgettype-raw) for detailed arguments specification.
91
91
* Returns `{Array}` array of `clipboardData` retrieved from the clipboard. Each item contains `type`, `data` and `raw` (optional) attributes.
92
92
93
93
## clip.readAvailableTypes()
94
94
95
-
* Returns `{Array}` list of available types of data in clipboard currenly. Each item is one of following types:
95
+
* Returns `{Array}` list of available types of data in clipboard currently. Each item is one of following types:
96
96
-`text`: plain text. Can be read by `clip.get('text')`.
97
97
-`html`: HTML text. Can be read by `clip.get('html')`.
98
98
-`rtf`: RTF (Rich Text Format). Can be read by `clip.get('rtf')`.
0 commit comments