Skip to main content
Participant
September 19, 2009
Question

HtmlImporter is not working

  • September 19, 2009
  • 1 reply
  • 489 views

My version of TLF is 502 (715519).

When i try to use HtmlImporter with folowing code:

var importer:HtmlImporter = new HtmlImporter(this._mainTextFlow.configuration);

var textFlow:TextFlow = importer.importToFlow(XML('<font color="#FF0000">hello world</font>'));

it's throw an errors:

1046: Type was not found or was not a compile-time constant: HtmlImporter.

1180: Call to a possibly undefined method HtmlImporter.

Using TextLayoutImporter, for example, doesn't throws similar errors.

Any ideas?

UPD: omg, using TextLayoutExporter throws similar errors. I'm scared.

Sorry for bad eng

This topic has been closed for replies.

1 reply

Adobe Employee
September 21, 2009

You can access the importers through the TextConverter. Just call

TextConverter.importToFlow(yourXML, HTML_FORMAT);

Or you can get an importer to use over and over again, by calling TextConverter.getImporter.

- robin