7 Replies Latest reply on Jun 21, 2011 3:22 AM by Maxime Chupin

    <pre> tag and textFlow

    Maxime Chupin

      Hi,

       

      I want to display some code. In a html page I use the <pre> tag. But in a textFlow this does not seem to work.

       

      I declared

      <fx:XML id="flexang" source="xml/flex-ang.xml" />

       

      and next:

      <s:RichEditableText id="codeView" editable="false" textFlow="{TextFlowUtil.importFromXML(flexang)}" />

       

      with in the Script tag:

      import spark.utils.TextFlowUtil;

       

      My XML file is

      <?xml version="1.0" encoding="utf-8"?>
      <TextFlow xmlns="http://ns.adobe.com/textLayout/2008">
      <pre>
      <span>Test for flex-ang.xml</span>
          <span> Alinéa ??</span>
      </pre>
      </TextFlow>

       

      If I try without the <pre> tag everything works but my text is not well formated. And with the <pre> tag, my application does not work (whereas I have not any error message).

       

      Do you have any idea to do what I want?

       

      Thanks.