Paste Code to Match Existing Formatting

Igor de Oliveira Couto igor at semperuna.com
Fri Apr 19 21:15:15 EDT 2013


On 20/04/2013, at 11:04 AM, charles61 <cszasz at mac.com> wrote:

> How do you script to allow the user to paste the selected text into a
> document so that it matches the type of font and size of font used in the
> word processing document?

Whether the user can match the format of the text in the document will depend on which program they are using, not on the way you copy the text.

On the Mac, for instance, some programs have a "Paste and Match Style" command, in the Edit menu, as well as the normal "Paste". The difference being, that if you select the normal "Paste", it will paste your text *exactly* as it was copied - ie., with the format (font, size, etc.) the way it was copied originally. If you select "Paste and Match Style", then it will ignore the formatting of the text on the clipboard, and will force it to follow the formatting of the document where you're pasting it.

I hope this helps.

--
Igor Couto
Sydney, Australia








More information about the use-livecode mailing list