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

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

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Export converter for plain text format. This class provides an alternative to the `TextConverter.export()` static method for exporting plain text. The PlainTextExporter class's `export()` method results in the same output string as the `TextConverter.export()` static method if the two properties of the PlainTextExporter class, the `PARAGRAPH_SEPARATOR_PROPERTY` and the `STRIP_DISCRETIONARY_HYPHENS_PROPERTY` properties, contain their default values of `"\n"` and `true`, respectively.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | config : ImportExportConfiguration Returns the import and export configuration. | ConverterBase
|  | errors : Vector.<String> [read-only] Errors encountered while parsing. | ConverterBase
|  | paragraphSeparator : String Specifies the character sequence used (in a text flow's plain-text equivalent) to separate paragraphs. | PlainTextExporter
|  | stripDiscretionaryHyphens : Boolean This property indicates whether discretionary hyphens in the text should be stripped during the export process. | PlainTextExporter
|  | throwOnError : Boolean | ConverterBase
|  | useClipboardAnnotations : Boolean | ConverterBase

Public Methods

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

Public Constants
Hide Inherited Public Constants
Show Inherited 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

paragraphSeparator | property

`paragraphSeparator:String`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Specifies the character sequence used (in a text flow's plain-text equivalent) to separate paragraphs. The paragraph separator is not added after the last paragraph.

This property applies to the `PLAIN_TEXT_FORMAT` exporter.

The default value is "\n".

Implementation
`public function get paragraphSeparator():String`
`public function set paragraphSeparator(value:String):void`

stripDiscretionaryHyphens | property |

`stripDiscretionaryHyphens:Boolean`

Language Version : | ActionScript 3.0-

Runtime Versions : | Flash Player 10, AIR 1.5

This property indicates whether discretionary hyphens in the text should be stripped during the export process. Discretionary hyphens, also known as "soft hyphens", indicate where to break a word in case the word must be split between two lines. The Unicode character for discretionary hyphens is `\u00AD`.

If this property is set to `true`, discretionary hyphens that are in the original text will not be in the exported text, even if they are part of the original text. If `false`, discretionary hyphens will be in the exported text.

Implementation
`public function get stripDiscretionaryHyphens():Boolean`
`public function set stripDiscretionaryHyphens(value:Boolean):void`
Constructor Detail

PlainTextExporter | () | Constructor

`public function PlainTextExporter()`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Constructor

Method Detail

export | () | method

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

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

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