Package | flashx.textLayout.edit |
Class | public class TextClipboard |
Inheritance | TextClipboard Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
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.
Related API Elements
Method | Defined By | ||
---|---|---|---|
[static]
Gets any text on the system clipboard as a TextScrap object. | TextClipboard | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
[static]
Puts a TextScrap onto the system clipboard. | TextClipboard | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
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.
flashx.textLayout.edit:TextScrap |
Related API Elements
setContents | () | method |
public static function setContents(textScrap: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
textScrap:flashx.textLayout.edit:TextScrap — The TextScrap to paste into the clipboard.
|
Related API Elements
Wed Nov 21 2018, 06:34 AM -08:00