This content has been marked as final. Show 6 replies
"smokeranch" <email@example.com> wrote in message
> I would like to create a simple text editor that performs syntax
> In order to do so, I would need the ability to set the style of individual
> pieces of text within a TextArea. Is this possible? Do I need to sublass
> TextArea (or perhaps the Text control) to do this? Any pointers in the
> direction would be appreciated. Thanks!
Yes, I've seen this example, however I don't want to markup display-only html text, I want to format text that the user is typing in an editor.
I'm not sure exactly what you mean. Are you saying you want to format text the user types and formats and then be able to save it to file? In that case how will the formatting be represented, if not via HTML tags?
Without a greater understanding of what you are trying to do, apart from using the TextArea htmlText property, I guess the RichTextEditor control is all I can suggest.
Ultimately what I want to do is provide a text editor for typing and executing SQL statements. The text is plain text, I just want to be able to do syntax highlighting for SQL keywords as the user types.
Well, you could use a change handler, so anytime the user completes a word, you wrap it in the proper <font color=""> </font> html.
The issues around formatting text in the Flash Player are numerous. There are several experts who have weighed in on this, including . Axel Jensen who has made available a modification of the RichTextEditor component. Additionally, Jesse Warden has several older articles in his blog on this issue. Finally, there is a commercially available Flash/Flex text editor developed by Igor (last name unknown to me), and found at: http://www.flashtexteditor.com/.
Overall, the issue of accurately formatting text in Flash/Flex has been an exercise in frustration, especially when trying to implement htmlText and CSS. I am absolutely amazed that Adobe's documentation for this very important aspect of web development is either unavailable or deeply flawed, and on top of that: How is the Acrobat Connect Buzzword application able to do so much with text formatting, clearly within a Flex Framework, and yet no concrete documentation of the techniques are available