Hello Friends, I am using Rich Text Editor in my app. In which i am using htmltext property. But problem is that i am saving this html text in database and i wan when application gets load again that text should be there. so on creation complete i am accessing that text from database in xml format ,but after apply thay to rich text area some allignment problems are coming.Means it not look properly as we save it. can anybody please help me in this. I posted the code below
MXML: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="588" height="393" applicationComplete="http.send()"> <mx:Script> <![CDATA[ import mx.rpc.events.FaultEvent; import mx.controls.Alert; import mx.rpc.events.ResultEvent; // string data to play with [Bindable]private var loremIpsum:String = "<TEXTFORMAT LEADING='2'><P ALIGN='CENTER'><FONT FACE='Verdana' SIZE='24' COLOR='#993300' LETTERSPACING='0' KERNING='0'><B><U>Hello</U></B></ FONT></P></TEXTFORMAT><TEXTFORMAT LEADING='2'><P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='14' COLOR='#000000' LETTERSPACING='0' KERNING='0'><B><U>My Name Is ravi,</U></B><B>My get is Kavi.</B></ FONT></P></TEXTFORMAT><TEXTFORMAT LEADING='2'><P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='14' COLOR='#000000' LETTERSPACING='0' KERNING='0'><B>Is kavi is get by mavi.</B></FONT></P></TEXTFORMAT>"; [Bindable] public var myString:String; private function getResult(e:ResultEvent): void { myString=XML(e.result).TEXTFORMAT; //Alert.show(""+myString) } private function getFault(e:FaultEvent): void { Alert.show(""+e.fault.toString()) } ]]> </mx:Script> <mx:HTTPService id="http" method="POST" url="dummy.xml" resultFormat="e4x" result="getResult(event)" showBusyCursor="true" fault="getFault(event)"/> <mx:TextArea id="sourceText" x="10" y="36" width="280" height="316" htmlText="{myString}" click="{Alert.show (''+sourceText.htmlText)}"/> <mx:TextArea id="destinationText" x="298" y="36" width="280" height="316" htmlText="{loremIpsum}"/> </mx:Application> XML: <root> <TEXTFORMAT LEADING='2'><P ALIGN='CENTER'><FONT FACE='Verdana' SIZE='24' COLOR='#993300' LETTERSPACING='0' KERNING='0'><B><U>Hello</ U></B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING='2'><P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='14' COLOR='#000000' LETTERSPACING='0' KERNING='0'><B><U>My Name Is ravi,</U></B><B>My get is Kavi.</B></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING='2'><P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='14' COLOR='#000000' LETTERSPACING='0' KERNING='0'><B>Is kavi is get by mavi.</B></FONT></ P></TEXTFORMAT> </root> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

