577
edits
| Line 31: | Line 31: | ||
An example of setting the clipboard in action is as follows: | An example of setting the clipboard in action is as follows: | ||
<pre class="brush:js;"> | <pre class="brush:js;"> | ||
var words = "The quick brown fox jumped over the lazy dog."; | var words = "The quick brown fox jumped over the lazy dog."; | ||
jetpack.os.clipboard.set( words ); | jetpack.os.clipboard.set( words ); | ||
</pre> | |||
var html = "<div>Hello <i>there!</i></div>"; | |||
jetpack.os.clipboard.set( html, "text/html" );</pre> | |||
'''Getting the clipboard''' | '''Getting the clipboard''' | ||
<pre class="brush:js;toolbar:false;">var value = jetpack.os.clipboard.get()</pre> | <pre class="brush:js;toolbar:false;">var value = jetpack.os.clipboard.get()</pre> | ||
edits