Kopiere HTML tekst og HTML formatering dynamisk
Hej,Jeg har lige formuleret et spørgsmål på et engelsk forum, men da det oftes er hurtigere og kvalificeret her inde ;-) vil jeg også prøve her. Jeg har pasted mit engelske spørgsmål ind nedfor....
I have a problem with copying some html text from a textfield WITH its html
formating. Here is my problem:
I pull in some htmlformatted text from an XML file. I put the text up in a
dummy textfield with its html formatting. I then need portions of this text
to display on the screen. I do this because I need to display my final text
in colums. I therefore set it up in a fomrattede dummyfield and find out how
much text i can fit into one of my colums. I dynamically selct the text from
the dummy field and place it into my final colum-textfield.
I get the selection out of the dummy field like this:
this.textContainer_1.dummy.text.substring(0, myEnd1)
MyEnd1 is a variable that tells me how far down in the tekst i should
select.
This all works fine, except this brings over the actaully text WITHOUT the
html formatting behind it.
Does anyone have a suggestion for how, knowing what part of the formatted
text i need, I can bring it over WITH the HTML formatting. The issue being
that if I do anything like:
this.textContainer_1.dummy.hrmlText.substring(0, myEnd1)
my count doesnt work because i will count the html tags as part of the
string!!!
I can give the code for how I get the myEnd1 var if that could help anyone.
Thanks
Michael
