HyperCard 2.x: Controlling Font, Style of Pasted Text (8/92)

In HyperCard 2.x, text pasted into a field will paste in the Font, Size and
Style of the field from which it was copied. To get pasted text to take on
the attributes of the target field, hold the Shift key down while pasting.

To see this effect working from a script, create two card fields, then
choose a different font and style for each. Then create a button with the
following script. Enter text into card field 1, then click the button, with
and without the optionKey down. (optionKey down demonstrates the shiftKey
effect)

on mouseUp
if the optionKey is down then
select text of cd field 1
doMenu "Copy Text"
select before word 1 of cd field 2
type "v" with commandKey,shiftKey
else
select text of cd field 1
doMenu "Copy Text"
select before word 1 of cd field 2
type "v" with commandKey
end if
end mouseUp


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012