Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
flashx.textLayout.edit 
TextClipboard 
Packageflashx.textLayout.edit
Classpublic class TextClipboard
InheritanceTextClipboard Inheritance Object

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The TextClipboard class copies and pastes TextScrap objects to and from the system clipboard.

When you copy a TextScrap to the TextClipboard, the information is copied to the system clipboard in two clipboard formats. One format is an XML string expressing the copied TextScrap object in Text Layout Markup syntax. This clipboard object uses the format name: "TEXT_LAYOUT_MARKUP". The second format is a plain-text string, which uses the standard Clipboard.TEXT_FORMAT name.

The methods of the TextClipboard class are static functions, you do not need to create an instance of TextClipboard.

See also



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
[static] Gets any text on the system clipboard as a TextScrap object.
TextClipboard
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
[static] Puts a TextScrap onto the system clipboard.
TextClipboard
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail

getContents

()method
public static function getContents():flashx.textLayout.edit:TextScrap

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Gets any text on the system clipboard as a TextScrap object.

If the "TEXT_LAYOUT_MARKUP" format is available, this method converts the formatted string into a TextScrap and returns it. Otherwise, if the Clipboard.TEXT_Format is available, this method converts the plain-text string into a TextScrap. If neither clipboard format is available, this method returns null.

Flash Player requires that the getContents() method be called in a paste event handler. In AIR, this restriction only applies to content outside of the application security sandbox.

Returns
flashx.textLayout.edit:TextScrap

See also

setContents

()method 
public static function setContents(scrap:flashx.textLayout.edit:TextScrap):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Puts a TextScrap onto the system clipboard.

The TextScrap is placed onto the system clipboard as both a Text Layout Markup representation and a plain text representation.

Flash Player requires a user event (such as a key press or mouse click) before calling setContents(). In AIR, this restriction only applies to content outside of the application security sandbox.

Parameters

scrap:flashx.textLayout.edit:TextScrap — The TextScrap to paste into the clipboard.

See also