• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Question about html->TextFlow

New Here ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

Hi all.

Does anybody know why this is works:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

               xmlns:s="library://ns.adobe.com/flex/spark"

               xmlns:mx="library://ns.adobe.com/flex/mx"

               creationComplete="onComplete(event)">

    <fx:Script>

        <![CDATA[

            import flashx.textLayout.conversion.TextConverter;

            import mx.events.FlexEvent;

           

            private var xml:XML=

                   

                <p color="0x336699">

                <b/>

                    The Text   Framework  is an extensible lie typography on the web.

                </p>

  ;

 

                   

            private function onComplete(e : FlexEvent) : void

            {

                trace(xml);

               

                richText.textFlow = TextConverter.importToFlow(xml, TextConverter.TEXT_FIELD_HTML_FORMAT );

                //richText.textFlow = TextFlowUtil.importFromXML(xml);

               

            }

        ]]>

    </fx:Script>

   

    <s:BorderContainer top="10" left="10" right="10" bottom="10">

        <s:RichEditableText id="richText"  />

    </s:BorderContainer>

</s:Application>

,but this doesn't:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

               xmlns:s="library://ns.adobe.com/flex/spark"

               xmlns:mx="library://ns.adobe.com/flex/mx"

               creationComplete="onComplete(event)">

    <fx:Script>

        <![CDATA[

            import flashx.textLayout.conversion.TextConverter;

            import mx.events.FlexEvent;

           

            private var xml:XML=

                   

                <p color="0x336699">

              

                    The Text   Framework  is an extensible lie typography on the web.

                </p>

  ;

 

                   

            private function onComplete(e : FlexEvent) : void

            {

                trace(xml);

               

                richText.textFlow = TextConverter.importToFlow(xml, TextConverter.TEXT_FIELD_HTML_FORMAT );

                //richText.textFlow = TextFlowUtil.importFromXML(xml);

               

            }

        ]]>

    </fx:Script>

   

    <s:BorderContainer top="10" left="10" right="10" bottom="10">

        <s:RichEditableText id="richText"  />

    </s:BorderContainer>

</s:Application>

???

Thx.

Andrew

TOPICS
Text layout framework

Views

2.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

LATEST

Are you talking about difference between <br/> and an empty line?

I think it's class XML that causes the different.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines