私はFlex/Airアプリケーションの開発者として勤務しており、バグのあるFlex RTE(RichTextEditor)を使用してユーザーがメモを管理できるようにしています。現時点では、TLF(テキストレイアウトフレームワーク)を使用して新しいテキストコンポーネントを作成するのはどれだけコストがかかるかを評価しようとしています。Flex RTE HtmlTextからTLF TextFlowへのインポート
RTEによって作成されたHTMLテキストを直接インポートすることができれば、本当に重要です。私は、TLF 1.1のリストに関するいくつかの制限があることを知っていますが、それは一般的には機能しますか?
私は同じようにRTEからいくつかのHTML形式のテキストをつかむしようとしている:私はこのようなTextConverterにこれを渡すとき
var htmlText:String = '<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="defaultFont" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0">1hr run on Wednesday - feeling ok!</FONT></P></TEXTFORMAT>'
:
var textFlow:TextFlow = TextConverter.importToFlow(htmlText, TextConverter.HTML_FORMAT);
Flash Playerは例外をスローします。私はまた
<html><body></body></html>
でテキストをラップしようとしましたが、同じ問題です。だからすぐには動作しないようです。あなたは何を経験していますか?これは私たちにとって本当に重要です。
UPDATE 1:
私は上記のようなHTML(同じ変数宣言)をインポートしようとすると、私はこのエラーを取得:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flashx.textLayout.formats::TextLayoutFormatValueHolder/apply()[C:\Vellum\branches\v1\1.0\dev\textLayout_core\src\flashx\textLayout\formats\TextLayoutFormatValueHolder.as:357]
at HtmlImporter$/parseTextFormat()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\HtmlImporter.as:307]
at BaseTextLayoutImporter/parseObject()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\BaseTextLayoutImporter.as:464]
at BaseTextLayoutImporter/parseFlowGroupElementChildren()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\BaseTextLayoutImporter.as:419]
at HtmlImporter$/parseHtmlContainer()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\HtmlImporter.as:269]
at BaseTextLayoutImporter/parseObject()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\BaseTextLayoutImporter.as:464]
at HtmlImporter/importFromXML()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\HtmlImporter.as:142]
at HtmlImporter/importFromString()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\HtmlImporter.as:130]
at BaseTextLayoutImporter/importToFlow()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\BaseTextLayoutImporter.as:73]
at flashx.textLayout.conversion::TextConverter$/importToFlow()[C:\Vellum\branches\v1\1.0\dev\textLayout_conversion\src\flashx\textLayout\conversion\TextConverter.as:87]
at TLFTestApp/init()[/Users/Arne/Documents/Adobe Flash Builder 4/TLFRichTextEditor/src/TLFTestApp.mxml:29] <-- // executing TextConverter.importToFlow(htmlText, TextConverter.HTML_FORMAT);
一方私は、タグを削除し、それが動作しますが、問題はまだ残っている。
ありがとうございます!
例外はありますか? – JeffryHouser
こんにちは、更新情報1を参照してください..ありがとう – dasnervtdoch