HOME       >>       Programming

Need Help With Flex Rich Text Editor Please! Im going mad because of the lack of flex support


shadowx

Hi guys.

 

a client wants a mailing list thingy, so im thinking i can use flex to give a really nice, slick interface... though for the money i should make her write raw HTML Grr....

 

Anyway. The point is making the RTE (rich text editor) is easy peasy <mx:RichTextArea etc....> But getting the HTML output seems impossible!!! I cant find any useful info on the abode site and all the tutorials i can find inviolve the use of a WYSIYG editor, but im writing raw mxml code here so thats no good.

 

Ive made a plain text area that i click a button and it is filled with the text of the RTE, that works fine, but i want the RTE to make HTML tags. For example, when the user clicks the bold button it writes "<B>" and then whatever the user types, when they click it again flex writes "</b>" etc.... and yet to the user it displays Bold text, not the HTML tags (this is possible, if i were to set the content of the RTE to "<B>bold text</b>" i would see "bold text". But how the hell do i get that back out as an output? when i click my button to set the second text box to have the same content as the RTE i just see "bold text" in normal writing with no bold tags. And this is no good! I also tried it submitting to a PHP script that saves it to a text file. Still no HTML tags.

 

So how do i get my RTE to output HTML tags? this is doing my head in! i could conceivably make my own custom RTE using search/replace/insert functions to manually insert bold, italic etc.. tags in but i cant be bothered. So please! Someone tell me how i can get an RTE to output HTML tags!!!!

 

EDIT: As is the way with much of my coding, ive found the answer eventually by trawling through source code. Its relatively simple, instead of using the "text" property of the RTE you use the htmlText property.... How dumb... Now i gotta remove the awkward HTML it writes. Im leaving this topic in place to help others. If anyone is interested the exact code is:

 

<mx:request xmlns=""> <rte>{RTE_NAME.htmlText}</rte> </mx:request>


VIEW ORIGINAL REGISTER GET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.