Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
ITextImporter

Package | flashx.textLayout.conversion
Interface | public interface ITextImporter

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Interface for importing text content into a TextFlow from an external source. The TextConverter class creates importers with no constructor arguments.

See also

flashx.textLayout.elements.TextFlow

Public Properties

| Property | Defined By
--- | --- | ---
|  | configuration : IConfiguration The configuration property contains the IConfiguration instance that the importer needs when creating new TextFlow instances. | ITextImporter
|  | errors : Vector.<String> [read-only] This property contains a vector of error messages as strings after a call to an importer method is the throwOnError property is set to false, which is the default. | ITextImporter
|  | throwOnError : Boolean The throwOnError property controls how the importer handles errors. | ITextImporter
|  | useClipboardAnnotations : Boolean Controls whether or not the importer should handle the extra information necessary for the clipboard. | ITextImporter

Public Methods

| Method | Defined By
--- | --- | ---
|  | importToFlow(source:Object):TextFlow Import text content from an external source and convert it into a TextFlow. | ITextImporter

Property Detail

configuration | property

`configuration:IConfiguration`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10.2, AIR 2.0

The `configuration` property contains the IConfiguration instance that the importer needs when creating new TextFlow instances. This property is initially set to `null`.

Implementation
`public function get configuration():IConfiguration`
`public function set configuration(value:IConfiguration):void`

See also

flashx.textLayout.elements.TextFlow

errors | property |

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

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

This property contains a vector of error messages as strings after a call to an importer 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, AIR 1.5

The `throwOnError` property controls how the importer 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 importer 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

Controls whether or not the importer should handle the extra information necessary for the clipboard. When data comes in from the clipboard, it might contain partial paragraphs; paragraphs that are missing the terminator or newline character. If `useClipboardAnnotations` is `true`, the importer marks these partial paragraphs with a `ConverterBase.MERGE_TO_NEXT_ON_PASTE` attribute. This causes the paste operation to correctly handle merging of the pasted paragraph (and any list or div elements that may include the paragraph) into the text.

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

See also

flashx.textLayout.conversion.ConverterBase.MERGE_TO_NEXT_ON_PASTE
Method Detail

importToFlow | () | method

`public function importToFlow(source:Object):TextFlow`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Import text content from an external source and convert it into a TextFlow.

Parameters

| `source:Object` — The data to convert.

Returns

| `TextFlow` — TextFlow Created from the source.

Wed Nov 15 2017, 09:50 AM +01:00