Embedd Image into html to display in richText

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Embedd Image into html to display in richText

chris_flex
I found this example:

http://www.java2s.com/Code/Flex/Development/EmbedimageintohtmlanddisplayitwithRichText.htm

<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
     
    xmlns:s="library://ns.adobe.com/flex/spark">
   
    <mx:Script>
       
            import spark.utils.TextFlowUtil;
           
            [Bindable]
            public var txt:String = "<div>" +
                " " +
                "<p>this is a test" + "bold" +
                "</p></div>";
     
    </mx:Script>
    <s:Graphic x="10" y="10">
        <s:RichText width="400" height="60"
                    columnCount="4"
                    fontFamily="Helvetica"
                    textFlow="{TextFlowUtil.importFromString(txt)}"
                    />
    </s:Graphic>
   
</mx:Application>

Where in the project structure should the folder assets with the icon.png be
located?





--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Embedd Image into html to display in richText

Carlos Rovira-2
No icon.png in code right? I think you missed some code in the code

2018-04-07 13:46 GMT+02:00 chris_flex <[hidden email]>:

> I found this example:
>
> http://www.java2s.com/Code/Flex/Development/Embedimageintohtmlanddisplayit
> withRichText.htm
>
> <mx:Application
>     xmlns:mx="http://www.adobe.com/2006/mxml"
>
>     xmlns:s="library://ns.adobe.com/flex/spark">
>
>     <mx:Script>
>
>             import spark.utils.TextFlowUtil;
>
>             [Bindable]
>             public var txt:String = "<div>" +
>                 " " +
>                 "<p>this is a test" + "bold" +
>                 "</p></div>";
>
>     </mx:Script>
>     <s:Graphic x="10" y="10">
>         <s:RichText width="400" height="60"
>                     columnCount="4"
>                     fontFamily="Helvetica"
>                     textFlow="{TextFlowUtil.importFromString(txt)}"
>                     />
>     </s:Graphic>
>
> </mx:Application>
>
> Where in the project structure should the folder assets with the icon.png
> be
> located?
>
>
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>



--
Carlos Rovira
http://about.me/carlosrovira
Reply | Threaded
Open this post in threaded view
|

Re: Embedd Image into html to display in richText

chris_flex
Sorry... just pasted the code...

Here as raw text...





--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/