577
edits
| Line 27: | Line 27: | ||
The <code>data</code> paramater can be anything, a string, a unicode string, a number, an image, and HTML fragment, etc. that you want to place in the system clipboard. | The <code>data</code> paramater can be anything, a string, a unicode string, a number, an image, and HTML fragment, etc. that you want to place in the system clipboard. | ||
The optional <code>dataType</code> let's Jetpack know what kind of data is being passed in, in mime-type format. For example, a unicode string would take <code>"text/unicode"</code>, HTML would be <code>"text/html"</code>, and an PNG would be <code>"image/png"</code>. If <code>dataType</code> isn't passed in, Jetpack makes | The optional <code>dataType</code> let's Jetpack know what kind of data is being passed in, in mime-type format. For example, a unicode string would take <code>"text/unicode"</code>, HTML would be <code>"text/html"</code>, and an PNG would be <code>"image/png"</code>. If <code>dataType</code> isn't passed in, Jetpack makes its best guess. | ||
An example of setting the clipboard in action is as follows: | An example of setting the clipboard in action is as follows: | ||
edits