Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
ITextExporter

Package | flashx.textLayout.conversion
Interface | public interface ITextExporter
Implementors | BaseTextLayoutExporter

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Interface for exporting text content from a TextFlow instance to a given format, which may for example be String or XML format, or a user-defined format. Exporters support the getting and setting of properties to control the export of data. These properties are implemented as public properties, but the direct access of these properties should be avoided, since a user might replace the converter class in the TextConverter registry, causing a downcast to fail.

Public Properties

| Property | Defined By
--- | --- | ---
|  | config : ImportExportConfiguration Accesses the config options for the exporter. | ITextExporter
|  | errors : Vector.<String> [read-only] This property contains a vector of error messages as strings after a call to an exporter method is the throwOnError property is set to false, which is the default. | ITextExporter
|  | throwOnError : Boolean The throwOnError property controls how the exporter handles errors. | ITextExporter
|  | useClipboardAnnotations : Boolean The useClipboardAnnotations property controls whether or not the importer should handle the extra information necessary for the clipboard. | ITextExporter

Public Methods

| Method | Defined By
--- | --- | ---
|  | export(source:TextFlow, conversionType:String):Object Export text content from a TextFlow instance in String, or XML, or a user defined format. | ITextExporter

Property Detail

config | property

`config:ImportExportConfiguration`

Accesses the config options for the exporter.

Implementation
`public function get config():ImportExportConfiguration`
`public function set config(value:ImportExportConfiguration):void`

errors | property |

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

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10.2, AIR 2.0

This property contains a vector of error messages as strings after a call to an exporter method is the `throwOnError` property is set to `false`, which is the default. If there were no errors, the property returns `null`. The property is reset on each method call.

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

throwOnError | property |

`throwOnError:Boolean`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10.2, AIR 2.0

The throwOnError property controls how the exporter handles errors. If set to `true`, methods throw an Error instance on errors. If set to `false`, which is the default, errors are collected into a vector of strings and stored in the `errors` property, and the exporter does not throw.

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

useClipboardAnnotations | property |

`useClipboardAnnotations:Boolean`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The `useClipboardAnnotations` property controls whether or not the importer should handle the extra information necessary for the clipboard. When data is in a TextFlow, paragraphs are always complete, and include a terminator character. When a range of text is pasted to the clipboard, it will form paragraphs, but the range may not include in the final terminator. In this case, the paragraph needs to be marked as a partial paragraph if it is intended for the clipboard, so that if it is later pasted it will merge into the new text correctly. If the content is intended for the clipboard, useClipboardAnnotations will be true.

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

export | () | method

`public function export(source:TextFlow, conversionType:String):Object`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Export text content from a TextFlow instance in String, or XML, or a user defined format.

Set the `conversionType` parameter to either of the following values, or a user defined format in user-defined exporters.

- `flashx.textLayout.conversion.ConversionType.STRING_TYPE`;
- `flashx.textLayout.conversion.ConversionType.XML_TYPE`.

Parameters

| `source:TextFlow` — The TextFlow to export
| `conversionType:String` — Return a String (STRING_TYPE) or XML (XML_TYPE), or any user defined format.

Returns

| `Object` — Object The exported content

See also

flashx.textLayout.conversion.ConversionType

Sun Mar 5 2017, 03:42 PM +11:00