////////////////////////////////////////////////////////////////////////////////
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package flashx.textLayout.conversion
{
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.elements.IConfiguration;
/**
* This is the gateway class for handling import and export. It serves as a unified access point to the
* conversion functionality in the Text Layout Framework.
* @includeExample examples\TextConverter_example.as -noswf
* @playerversion Flash 10
* @playerversion AIR 1.5
* @langversion 3.0
*/
public class TextConverter
{
/**
* HTML format.
* Use this for importing from, or exporting to, a TextFlow using the HTML fomat.
* The Text Layout Framework HTML supports a subset of the tags and attributes supported by
* the TextField class in the flash.text
package.
*
The following table lists the HTML tags and attributes supported for the import * and export process (tags and attributes supported by TextField, but not supported by * the Text Layout Framework are specifically described as not supported):
* * ** Tag * | * ** Description * | * *
---|---|
* Anchor tag * | * *
* The <a> tag creates a hypertext link and supports the following attributes:
*
|
*
* Bold tag * | * *
* The <b> tag renders text as bold. A bold typeface must be available for the font used.
* |
*
* Break tag * | *
* The <br> tag creates a line break in the text.
* |
*
* Font tag * | * *
* The <font> tag specifies a font or list of fonts to display the text.The font tag
* supports the following attributes:
*
|
*
* Image tag * | * *
* The <img> tag lets you embed external image files (JPEG, GIF, PNG), SWF files, and
* movie clips inside text.
*
* The
Note: Unlike the TextField class, the following attributes are not supported:
* |
*
* Italic tag * | * *
* The <i> tag displays the tagged text in italics. An italic typeface must be available
* for the font used.
* |
*
* List item tag * | * ** Note: Unlike the TextField class, the List item tag is not supported. * | *
* Paragraph tag * | * *
* The <p> tag creates a new paragraph.
*
* The <p> tag supports the following attributes:
*
|
*
* Span tag * | * *
*
* The <span> tag supports the following attributes:
*
*
|
*
* Text format tag * | * *
* The The
|
*
* Underline tag * | * *
* The <u> tag underlines the tagged text.
* |
*
Use one of the four static constants supplied with this class
* to specify the format
parameter:
*
Use one of the four static constants supplied with this class
* to specify the format
parameter:
*
Specify the type of the exported data in the conversionType
parameter
* with one of the two static constants supplied by the ConversionType class:
*
flashx.textLayout.conversion.TextConverter.importToFlow()
.
* Use one of the four static constants supplied with this class
* to specify the format
parameter:
*
flashx.textLayout.conversion.TextConverter.export()
.
* Use one of the four static constants supplied with this class
* to specify the format
parameter:
*