PDA

View Full Version : Inserting a bullet


wesztweszt
07-31-2007, 02:40 PM
Without going into much detail as to why, I'm working on a project that required a custom built rich text editor and for the most part, everything is working great. Unfortunately I can't seem to figure out how to insert a bullet (in other words, make selected text into a list item).

My original thinking was that I could do something like this:

tf.htmlText = "<li>" + tf.htmlText + </li>";

This most definitely doesn't work, the textarea seems to ignore the <li> tag completely.

Any help would be greatly appreciated.

flexy
08-01-2007, 09:01 AM
You're missing the left quote-mark where you declare the </li> closure tag:

tf.htmlText = "<li>" + tf.htmlText + "</li>";

<li> is supported as htmlText in Flex.
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000561.html

Which component are you using; TextField, Text, TextArea?

wesztweszt
08-02-2007, 12:52 PM
I'm using TextArea (and thanks for noticing the missing quote, though unfortunately that wasn't the solution).

It's baffling that I can populate the TextArea from an external XML file that contains bullets and they appear, but when I try to "manually" insert them, they don't? I did see a brief reference somewhere that <li> tags aren't "exposed" in Flex, but that didn't help.