flashx.textLayout.conversion

# ConverterBase - AS3

Package | flashx.textLayout.conversion
Class | public class ConverterBase
Inheritance | ConverterBase Object
Subclasses | PlainTextExporter

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 2.0

This is a base class for importers as well as exporters. It implements the error handling plus property getters and setters that generate an error when invoked.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | errors : Vector.<String> [read-only] Errors encountered while parsing. | ConverterBase
|  | throwOnError : Boolean | ConverterBase
|  | useClipboardAnnotations : Boolean | ConverterBase

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | MERGE_TO_NEXT_ON_PASTE : String = "mergeToNextOnPaste" [static] A converter that converts clipboard data into a TextFlow should use the MERGE_TO_NEXT_ON_PASTE property to control how the elements are treated when they are merged into an existing TextFlow on paste. | ConverterBase

Property Detail

### errors

property

`errors:Vector.<String>` [read-only]

Errors encountered while parsing. Value is a vector of Strings.

Implementation
`public function get errors():Vector.<String>`

### throwOnError

property

`throwOnError:Boolean`

Implementation
`public function get throwOnError():Boolean`
`public function set throwOnError(value:Boolean):void`

### useClipboardAnnotations

property

`useClipboardAnnotations:Boolean`

Implementation
`public function get useClipboardAnnotations():Boolean`
`public function set useClipboardAnnotations(value:Boolean):void`
Constant Detail

### MERGE_TO_NEXT_ON_PASTE

Constant

`public static const MERGE_TO_NEXT_ON_PASTE:String = "mergeToNextOnPaste"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

A converter that converts clipboard data into a TextFlow should use the MERGE_TO_NEXT_ON_PASTE property to control how the elements are treated when they are merged into an existing TextFlow on paste. This is useful if you want special handling for the case where only part of the element is copied. For instance, wheh a list is copied, if only part of the list is copied, and you paste it into another list, it merges into the list as additional items. If the entire list is copied, it appears as a nested list. When TLF creates a TextFlow for use on the clipboard, it decorates any partial elements with user properties that control whether the end of the element should be merged with the one after it. This user property is never pasted into the final TextFlow, but it may go on the elements in the TextScrap.textFlow. When copying text, the converter has the option to look for these properties to propagate them into the format that is posted on the clipboard. For instance, the plain text exporter checks the "mergeToNextOnPaste" property on paragraphs and supresses the paragraph terminator if it is found set to true. Likewise on import if the incoming String has no terminator, and useClipboardAnnotations is true, then it calls `setStyle(MERGE_TO_NEXT_ON_PASTE, "true")` on the corresponding paragraph so that when it is pasted it will blend into the paragraph where its pasted. This property should only be set on elements in a TextScrap, and only on the last element in the scrap.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00