copy linked text

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Preston Shea
Posts: 73
Joined: Sat Apr 08, 2006 6:51 pm

copy linked text

Post by Preston Shea » Wed Mar 23, 2011 10:06 pm

how do I script the copying of text in field of one stack to field in another stack keeping formatting of link text etc.?
In nova fert animus mutatas dicere formas corpora.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: copy linked text

Post by mwieder » Wed Mar 23, 2011 10:11 pm

get and set the htmltext of the field instead of just the text of the field.

Preston Shea
Posts: 73
Joined: Sat Apr 08, 2006 6:51 pm

Re: copy linked text

Post by Preston Shea » Thu Mar 24, 2011 12:22 am

Great! and thanks. Now for a dumb question:
how do I get the text to display as formatted instead of with <tags>?
In nova fert animus mutatas dicere formas corpora.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: copy linked text

Post by mwieder » Thu Mar 24, 2011 3:16 am

Sorry - I should have been more explicit...

-- get the htmltext of the source field into a variable
put the htmltext of field 1 into tHTMLText

-- then store it into the destination field
set the htmltext of field 2 to tHTMLText

Preston Shea
Posts: 73
Joined: Sat Apr 08, 2006 6:51 pm

Re: copy linked text

Post by Preston Shea » Thu Mar 24, 2011 2:09 pm

Thanks again.
Preston Shea
In nova fert animus mutatas dicere formas corpora.

Post Reply