Thanks guys,
I have built a TLF text editor for a flex application.
For bullet points, I have followed Richard Leggett's
approach
of adding a SpanElement at the beginning of the paragraph
containing a bullet symbol and a couple of tabs. However, I get the
following problems:
1. I use marginLeft to indent the whole paragraph to the
right and textIndent to indent the bullet to the left (default
bullet format). While this works fine for some font sizes, it wont
work for bigger or smaller text, unless i do some clever
calculating of font size vs marginLeft/textIndent and number of
tabs required.
2. Bullet characters can be deleted, which leaves the
marginLeft/textIndent formatting. No big deal though..
3. When adding a bullet to and empty paragraph, I create the
bullet span, but I cannot get the cursor to go to the second empty
span. Therefore, the user types in the same bullet span which leads
to other problems, particularly when I try to delete the bullet
(first span)
4. When I try to remove the bullet from the paragraph, I
sometimes get errors fired from the applyParagraphFormat. I don't
always find it easy to debug this when I get errors like this:
Cannot access a property or method of a null object
reference.
at
flashx.textLayout.edit::ParaEdit$/cacheParagraphStyleInformation();
Is there any way to get the bullet as a span or another
paragraph, outside the main text paragraph? I think that would
solve lots of problems.
Would you mind sharing some source code if you feel that it
could help?
Thank you for your time
Nikos