<doc>
	<legacy_id>1735</legacy_id>
	<name>clipboardData</name>
	<type>property</type>

	<syntax>
		<example>set the clipboardData to <i>clipboardArray</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Specifies what data and of what type is on the <function tag="clipboard">clipboard</function>.</summary>

	<examples>
<example>set the clipboardData["text"] to "Meep!"</example>
<example>set the clipboardData["RTF"] to the RTFText of field "Info"</example>
<example>set the clipboardData["image"] to image 1</example>
<example>set the clipboardData["styledText"] to the styledText of field 4</example>
	</examples>

	<history>
		<introduced version="2.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="6.7">Styled text was added</changed>
<changed version="2.9">2.9</changed>
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
		<global/>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

	<classes>
		<desktop/>
		<web/>
	</classes>

	<security>
	</security>


	<classification>
		<category>User Interaction</category>
	</classification>

	<references>
		<command tag="copy">copy Command</command>
		<property tag="dragData">dragData Property</property>
	</references>

	<description>
	<overview>Use the <b>clipboardData</b> property to put data in the clipboard in a specified format, or to get the contents of the clipboard, without copying or pasting.</overview>

		<parameters>
  <parameter>
    <name>text</name>
    <description>plain text in the native encoding to the platform (MacRoman on OS X, Windows-1252 on
  Windows and ISO8859-1 on Unix)</description>
  </parameter>
  <parameter>
    <name>styledText</name>
    <description>styled text in LiveCode styledText array format (the same as the styledText property of a field)</description>
  </parameter>
  <parameter>
    <name>unicode</name>
    <description>plain text in UTF-16 encoded using host byte order</description>
  </parameter>
  <parameter>
    <name>styles</name>
    <description>styled text in LiveCode internal styled-text format</description>
  </parameter>
  <parameter>
    <name>html</name>
    <description>styled text in LiveCode HTML format</description>
  </parameter>
  <parameter>
    <name>rtf</name>
    <description>styled text in LiveCode RTF format</description>
  </parameter>
  <parameter>
    <name>image</name>
    <description>the 'text' of an image object, i.e. binary data in PNG, GIF or JPEG format</description>
  </parameter>
  <parameter>
    <name>files</name>
    <description>a return-delimited list of filenames in LiveCode format</description>
  </parameter>
  <parameter>
    <name>objects</name>
    <description>one or more LiveCode objects serialized into an internal format</description>
  </parameter>
  <parameter>
    <name>private</name>
    <description>an arbitrary application-defined string. This format will only be visible within the same LiveCode process </description>
  </parameter>		</parameters>

	<value>The <b>clipboardData</b> pseudo-array provides access to the data to be transferred through a drag-drop operation.<p></p><p>If the clipboard does not contain data of the specified type, the array element for that type is empty. (For example, if the clipboard contains text, clipboardData["image"] is empty.)</p></value>
	<comments>The clipboardData property is populated automatically when the clipboard content is changed, either by using the cut or copy command, or by cutting or copying in another application.<p></p><p>You can query the keys of the clipboardData to determine what types of data are on the clipboard. For example, if the clipboard contains styled text, you can put that text (in htmlText format) in a variable with the following statement:</p><p></p><p>put the clipboardData["html"] into tHTML</p><p></p><p></p><note> The objects type can now be queried and will return a binary string that can be re-used.  Furthermore, this type is now published to all applications and so object cut/copy/paste operaions can occur between LiveCode processes.  To change the contents of the clipboard, you can set the clipboardData property directly. For example, the following statement places the text "Hello World" on the clipboard:</note><p></p><p>set the clipboardData["text"] to "Hello World"</p><p></p><p>The above statement is equivalent to selecting the text "Hello World" in a field and choosing Edit menu, or to using the copy command. The data you place on the clipboard is accessible to your application using the paste command, and to other applications (that support pasting text) using the application's Paste menu item.</p><p></p><p></p><tip> To quickly find out what kind of data is on the clipboard, use the clipboardfunction.</tip></comments>
	</description>
</doc>