Packageflashx.textLayout.conversion
Classpublic class BaseTextLayoutExporter
InheritanceBaseTextLayoutExporter Inheritance ConverterBase Inheritance Object
Implements ITextExporter

Base export converter for TextLayout format.



Public Properties
 PropertyDefined By
 Inheritedconfig : ImportExportConfiguration
Returns the import and export configuration.
ConverterBase
 Inheritederrors : Vector.<String>
[read-only] Errors encountered while parsing.
ConverterBase
  flowNS : Namespace
[read-only]
BaseTextLayoutExporter
 InheritedthrowOnError : Boolean
ConverterBase
 InheriteduseClipboardAnnotations : Boolean
ConverterBase
Protected Properties
 PropertyDefined By
  formatDescription : Object
[read-only]
BaseTextLayoutExporter
  spanTextReplacementRegex : RegExp
[read-only] Gets the regex that specifies characters in span text to be replaced with XML elements.
BaseTextLayoutExporter
Public Methods
 MethodDefined By
  
BaseTextLayoutExporter(ns:Namespace, rootTag:XML, configuration:ImportExportConfiguration)
BaseTextLayoutExporter
  
export(source:TextFlow, conversionType:String):Object
Export text content from a TextFlow instance in String, or XML, or a user defined format.
BaseTextLayoutExporter
  
exportChild(flowElement:FlowElement):XMLList
Exports the object.
BaseTextLayoutExporter
  
[static] Base functionality for exporting a ContainerFormattedElement.
BaseTextLayoutExporter
  
[static] Base functionality for exporting a FlowElement.
BaseTextLayoutExporter
  
[static] Base functionality for exporting a FlowGroupElement.
BaseTextLayoutExporter
  
[static]
BaseTextLayoutExporter
  
[static]
BaseTextLayoutExporter
  
[static] Base functionality for exporting a ParagraphFormattedElement.
BaseTextLayoutExporter
  
[static] Base functionality for exporting a Span.
BaseTextLayoutExporter
  
exportSpanText(destination:XML, span:SpanElement, replacementRegex:RegExp, replacementXMLCallback:Function):void
[static]
BaseTextLayoutExporter
  
[static] Base functionality for exporting a TableCellElement.
BaseTextLayoutExporter
  
[static] Base functionality for exporting a TableElement.
BaseTextLayoutExporter
  
[static] Base functionality for exporting a TableRowElement.
BaseTextLayoutExporter
  
exportTextFlow(exporter:BaseTextLayoutExporter, textFlow:TextFlow):XMLList
[static] Base functionality for exporting a TextFlow.
BaseTextLayoutExporter
Protected Methods
 MethodDefined By
  
Overridable worker method for exporting a ParagraphFormattedElement.
BaseTextLayoutExporter
  
exportFlowElement(flowElement:FlowElement):XMLList
Overridable worker method for exporting a FlowElement.
BaseTextLayoutExporter
  
exportList(flowElement:FlowElement):XMLList
BaseTextLayoutExporter
  
exportListItem(flowElement:FlowElement):XMLList
BaseTextLayoutExporter
  
Overridable worker method for exporting a ParagraphFormattedElement.
BaseTextLayoutExporter
  
exportStyles(xml:XMLList, sortableStyles:Array):void
Helper function to export styles (core or user) in the form of xml attributes or xml children.
BaseTextLayoutExporter
  
exportTableCellElement(tableCellElement:TableCellElement):XMLList
Overridable worker method for exporting a TableCellElement.
BaseTextLayoutExporter
  
exportTableElement(tableElement:TableElement):XMLList
Overridable worker method for exporting a TableElement.
BaseTextLayoutExporter
  
exportTableRowElement(tableRowElement:TableRowElement):XMLList
Overridable worker method for exporting a TableRowElement.
BaseTextLayoutExporter
  
exportToXML(textFlow:TextFlow):XML
Export text content of a TextFlow into XFL format.
BaseTextLayoutExporter
  
Gets the xml element used to represent a character in the export format
BaseTextLayoutExporter
Public Constants
 ConstantDefined By
 InheritedMERGE_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
flowNSproperty
flowNS:Namespace  [read-only]


Implementation
    public function get flowNS():Namespace
formatDescriptionproperty 
formatDescription:Object  [read-only]


Implementation
    protected function get formatDescription():Object
spanTextReplacementRegexproperty 
spanTextReplacementRegex:RegExp  [read-only]

Gets the regex that specifies characters in span text to be replaced with XML elements. Note: Each match is a single character


Implementation
    protected function get spanTextReplacementRegex():RegExp
Constructor Detail
BaseTextLayoutExporter()Constructor
public function BaseTextLayoutExporter(ns:Namespace, rootTag:XML, configuration:ImportExportConfiguration)



Parameters
ns:Namespace
 
rootTag:XML
 
configuration:ImportExportConfiguration
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.

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
exportChild()method 
public function exportChild(flowElement:FlowElement):XMLList

Exports the object. It will find the appropriate exporter and use it to export the object.

Parameters

flowElement:FlowElement — Root object for the export

Returns
XMLList — XMLList XML for the flowElement
exportContainerFormattedElement()method 
protected function exportContainerFormattedElement(flowElement:FlowElement):XMLList

Overridable worker method for exporting a ParagraphFormattedElement. Creates the XMLList.

Parameters

flowElement:FlowElement — Element to export

Returns
XMLList — XMLList XML for the element
exportContainerFormattedElement()method 
public static function exportContainerFormattedElement(exporter:BaseTextLayoutExporter, container:ContainerFormattedElement):XMLList

Base functionality for exporting a ContainerFormattedElement. Exports as a ParagraphFormattedElement, and exports container attributes.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
container:ContainerFormattedElement — Element to export

Returns
XMLList — XMLList XML for the element
exportFlowElement()method 
protected function exportFlowElement(flowElement:FlowElement):XMLList

Overridable worker method for exporting a FlowElement. Creates the XMLList.

Parameters

flowElement:FlowElement — Element to export

Returns
XMLList — XMLList XML for the element
exportFlowElement()method 
public static function exportFlowElement(exporter:BaseTextLayoutExporter, flowElement:FlowElement):XMLList

Base functionality for exporting a FlowElement.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
flowElement:FlowElement — Element to export

Returns
XMLList — XMLList XML for the element
exportFlowGroupElement()method 
public static function exportFlowGroupElement(exporter:BaseTextLayoutExporter, flowBlockElement:FlowGroupElement):XMLList

Base functionality for exporting a FlowGroupElement. Exports as a FlowElement, and exports the children of a element.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
flowBlockElement:FlowGroupElement — Element to export

Returns
XMLList — XMLList XML for the element
exportList()method 
protected function exportList(flowElement:FlowElement):XMLList

Parameters

flowElement:FlowElement

Returns
XMLList
exportList()method 
public static function exportList(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList

Parameters

exporter:BaseTextLayoutExporter
 
flowParagraph:ParagraphFormattedElement

Returns
XMLList
exportListItem()method 
protected function exportListItem(flowElement:FlowElement):XMLList

Parameters

flowElement:FlowElement

Returns
XMLList
exportListItem()method 
public static function exportListItem(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList

Parameters

exporter:BaseTextLayoutExporter
 
flowParagraph:ParagraphFormattedElement

Returns
XMLList
exportParagraphFormattedElement()method 
protected function exportParagraphFormattedElement(flowElement:FlowElement):XMLList

Overridable worker method for exporting a ParagraphFormattedElement. Creates the XMLList.

Parameters

flowElement:FlowElement — Element to export

Returns
XMLList — XMLList XML for the element
exportParagraphFormattedElement()method 
public static function exportParagraphFormattedElement(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList

Base functionality for exporting a ParagraphFormattedElement. Exports as a FlowGroupElement, and exports paragraph attributes.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
flowParagraph:ParagraphFormattedElement — Element to export

Returns
XMLList — XMLList XML for the element
exportSpan()method 
public static function exportSpan(exporter:BaseTextLayoutExporter, span:SpanElement):XMLList

Base functionality for exporting a Span. Exports as a FlowElement, and exports the text of the span.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
span:SpanElement — Element to export

Returns
XMLList — XMLList XML for the element
exportSpanText()method 
public static function exportSpanText(destination:XML, span:SpanElement, replacementRegex:RegExp, replacementXMLCallback:Function):void

Parameters

destination:XML
 
span:SpanElement
 
replacementRegex:RegExp
 
replacementXMLCallback:Function

exportStyles()method 
protected function exportStyles(xml:XMLList, sortableStyles:Array):void

Helper function to export styles (core or user) in the form of xml attributes or xml children.

Parameters

xml:XMLList — object to which attributes/children are added
 
sortableStyles:Array — an array of objects (xmlName,xmlVal) members that is sorted and exported.

exportTableCellElement()method 
protected function exportTableCellElement(tableCellElement:TableCellElement):XMLList

Overridable worker method for exporting a TableCellElement. Creates the XMLList.

Parameters

tableCellElement:TableCellElement — Element to export

Returns
XMLList — XMLList XML for the element
exportTableCellElement()method 
public static function exportTableCellElement(exporter:BaseTextLayoutExporter, tableCell:TableCellElement):XMLList

Base functionality for exporting a TableCellElement. Exports as a TableCellElement, and exports table cell attributes.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
tableCell:TableCellElement — Element to export

Returns
XMLList — XMLList XML for the element
exportTableElement()method 
protected function exportTableElement(tableElement:TableElement):XMLList

Overridable worker method for exporting a TableElement. Creates the XMLList.

Parameters

tableElement:TableElement — Element to export

Returns
XMLList — XMLList XML for the element
exportTableElement()method 
public static function exportTableElement(exporter:BaseTextLayoutExporter, table:TableElement):XMLList

Base functionality for exporting a TableElement. Exports as a TableElement, and exports table attributes.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
table:TableElement — Element to export

Returns
XMLList — XMLList XML for the element
exportTableRowElement()method 
protected function exportTableRowElement(tableRowElement:TableRowElement):XMLList

Overridable worker method for exporting a TableRowElement. Creates the XMLList.

Parameters

tableRowElement:TableRowElement — Element to export

Returns
XMLList — XMLList XML for the element
exportTableRowElement()method 
public static function exportTableRowElement(exporter:BaseTextLayoutExporter, tableRow:TableRowElement):XMLList

Base functionality for exporting a TableRowElement. Exports as a TableRowElement, and exports table row attributes.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
tableRow:TableRowElement — Element to export

Returns
XMLList — XMLList XML for the element
exportTextFlow()method 
public static function exportTextFlow(exporter:BaseTextLayoutExporter, textFlow:TextFlow):XMLList

Base functionality for exporting a TextFlow. Exports as a ContainerElement, and exports container attributes.

Parameters

exporter:BaseTextLayoutExporter — Root object for the export
 
textFlow:TextFlow — Element to export

Returns
XMLList — XMLList XML for the element
exportToXML()method 
protected function exportToXML(textFlow:TextFlow):XML

Export text content of a TextFlow into XFL format.

Parameters

textFlow:TextFlow — the text to export

Returns
XML — XML the exported content
getSpanTextReplacementXML()method 
protected function getSpanTextReplacementXML(ch:String):XML

Gets the xml element used to represent a character in the export format

Parameters

ch:String

Returns
XML