Labs/Jetpack/JEP/10: Difference between revisions

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;">var html = "<div>Hello <i>there!</i></div>";
<pre class="brush:js;">
jetpack.os.clipboard.set( html, "text/html" );
 
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>
577

edits