I need to make a text tool that allows the user to select some text, press a
button and the selected text changes according to the color of the button.
Basically I want to insert som html formatting into the string and show it
as html text eg
Hello <font color="#i006633"> there </font>
My approach is like this:
1. When button is pressed i use
Selection.getBeginIndex()/Selection.getEndIndex() to find selection.
2. I put the htmlText into a string
3. Loop though it, find the correct spot and insert my html code
The probleme is this, when I get the HTML code, there is a bunch of stuff in
there like:
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Cooper Black" SIZE="15"
COLOR="#000000" LETTERSPACING="0" KERNING="0"> Hello there<font etc>hello
again</font>etc...
if i know where i am in my string eg. between the two ll's in the first
Hello (index 2) how do I map that into the entire html string so i can place
my new code the correct place?
Thank you
M
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com