Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Need Help With Flex Rich Text Editor Please!, Im going mad because of the lack of flex support
shadowx
post Sep 30 2008, 04:22 PM
Post #1


Look around, what do you see? Incorrect.
***********

Group: [HOSTED]
Posts: 1,118
Joined: 12-April 06
From: Essex, UK
Member No.: 21,719
myCENT:47.88



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:

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


This post has been edited by shadowx: Sep 30 2008, 04:44 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Adobe Flex, Air Resources(0)
  2. Flex Error #1034: Type Coercion Failed: Cannot Convert Mx.managers(1)
  3. Trap17 Flex Layout(0)
  4. Flex Contact Form V2(9)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 05:28 PM