TEStylPaste
TEStylPaste
Paste text + styles from the desk scrap into an edit record TEStylPaste copies a 'TEXT' entry from the desk scrap into an edit record at the current insertion point and if a 'styl' entry exists in the
desk scrap, the styles therein are applied to the pasted test. If any text is
currently selected, it is replaced by the data from the desk scrap.
hTE is a handle obtained via TENew (old style TextEdit record) or TEStylNew (new style TextEdit record). It leads to a variable-length TERec structure and identifies the edit record to be affected by this change.
Calls to TECopy and TEPaste use the desk scrap directly, rather than maintaining a private TextEdit scrap. There is no need for a "TEStylCopy or "TEStylCut", since the new versions of TECopy and TECut transfer the style information along with the text. If you are using old style
TextEdit records (obtained via a call to TENew), you should call scrap.
In an old-format edit record, TEStylPaste transfers only the text.