Jump to content
xisto Community
Sign in to follow this  
shadowx

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

Recommended Posts

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>
Edited by shadowx (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.