Nested Span in TLF!
Hi folks...
There is problem here:
I have something like this in my RichEditableText's textFlow:
str = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>"+"<div><tab/>" +
"<span fontFamily='tahoma' fontSize='12' color='0xc08057'>text specific word text</span></div>"+"</TextFlow>";
RichEditableText.textFlow=TextConverter.importToFlow(str, TextConverter.TEXT_LAYOUT_FORMAT);
I want to use replace() func, just like this:
var myPattern:RegExp = new RegExp(TextInput.text,"gi")
str = str.replace(myPattern,"<span backgroundColor='#c17e56' color='#dec59d'>"+TextInput.text+"</span>");
RichEditableText.textFlow= TextConverter.importToFlow(str, TextConverter.TEXT_LAYOUT_FORMAT);
But after doing this, my specific word that I had been written in my TextInput, would'nt be appear inside of my text. I think because of another <span> in the main text. the result is something like this:
<span fontFamily='tahoma' fontSize='12' color='0xc08057'>
text <span backgroundColor='#c17e56' color='#dec59d'>specific word</span> text
</span>how can I fix this?!
