Skip navigation
dineshmgkvp
Currently Being Moderated

Padding has no effect in image in TLF

Dec 19, 2011 8:52 PM

My Code:

 

var tl:String = "<p>Hello, <img paddingTop='10' paddingBottom='10'  src='https://imgssl.constantcontact.com/letters/images/v8_your_image_100x10 0.gif' align='right'></img></p>";

 

htmlFlowReference.textFlow = TextConverter.importToFlow(tl, TextConverter.TEXT_FIELD_HTML_FORMAT);

 

 

Please suggest what i doing wrong....

 
Replies
  • Currently Being Moderated
    Dec 19, 2011 11:42 PM   in reply to dineshmgkvp

    paddingTop and paddingBottom can work with TextConverter.TEXT_FIELD_HTML_FORMAT.

    HTML importer in TLF is a little bit simple.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 5:19 AM   in reply to Jin-Huang

    The paddingTop and paddingBottom don't seem to work when importing from an external XML source. Is there any reason why?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 6:05 PM   in reply to F.Bowman

    Did you try to import the internal XML with same content? I cannot imagine it's because XML is external.

    Paste your code scrap here. I will try to help you.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2012 3:52 AM   in reply to Jin-Huang

    This is a sample of the code I'm using.


    External XML File:

     

    <?xml version="1.0" encoding="utf-8"?>

     

    <TextFlow xmlns="http://ns.adobe.com/textLayout/2008" whiteSpaceCollapse="preserve">

         <div>

              <p>

                   <span>To change password perform the following steps:</span>

                   <br/><br/>

                   <span>1. Click on the eSubmit Plus menu option on the main navigation bar.</span><br/>

                   <span>2. Select Preferences from the drop down list as shown in figure 3.</span><br/>

                   <span>3. Enter your old password, enter your new password and verify the new password in the text area as seen in figure 4.</span><br/>

                   <span>4. Click the Save button to save the new password.</span>

                   <br/>

                   <img width="494" height="285" source="images/help/account_01.png"/>

                   <br/>

                   <img width="397" height="269" source="images/help/account_02.png"/>

              </p>

         </div>

    </TextFlow>

     

     

    Other external XML file:

     

    <?xml version="1.0" encoding="utf-8"?>

     

    <TextFlow xmlns="http://ns.adobe.com/textLayout/2008" whiteSpaceCollapse="preserve" fontSize="11">

              <div>

                        <p>To log into the system, please do the following:</p>

                        <p/>

                        <p><img width="510" height="325" source="images/help/login_01.png"/></p>

                        <p/>

                        <p>Once your logon is successful you will be taken to the logon screen.</p>

                        <p/>

                        <p><img width="475" height="293" source="images/help/login_02.png"/></p>

              </div>

    </TextFlow>

     

     

    Flex Code:

     

    init() fires on creationComplete().

     

     

    [Bindable] private var helpSource:TextFlow;

     

    private function init():void

    {

         helpSource = TextFlowUtil.importFromXML(helpIndexSource);

    }

     

    <fx:Declarations>

         <fx:XML id="helpIndexSource" source="xml/helpIndex.xml"/>

    </fx:Declarations>

     

    <s:RichEditableText id="helpIndexDisplay" x="10" y="10" width="220" height="530" editable="false" textFlow="{helpSource}"/>

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 4, 2012 7:08 PM   in reply to F.Bowman

    I confirmed the bug. But it's a Flex bug. Please file it on https://bugs.adobe.com/flex/

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points