[TIP] How to ensure plain pasted text

Hugh Senior h at FlexibleLearning.com
Sat Oct 25 14:31:56 EDT 2008


Hi BvG

Upon reflexion and trying your handler with both 2.9 and 3.0 in Windows, I
prefer your simpler solution over my use of the templateField (although it
was an interesting exercise in itself). The loss of paragraphs was the
result of my original methodology and manipulations of the clipboardData
arrays and is therefore spurious.

The only change I would make to your handler is changing 'selection' to
'selectedField' which allows for selected text to be replaced...

on commandKeyDown Vkey
   if Vkey = "v" and the selectedField is not empty then
     put the clipboardData["text"] into the selection
   else
     pass commandKeyDown
   end if
end commandKeyDown

Thank you.

/H


>Hi Hugh
>
>Can you elaborate a bit on the problems that you see with my method? I
>am using it in some places, and plan to use it in the future too, so
>any backdraw would be of interest to me. Unfortunately I have no clue
>what you wanted to say. What arrays? Who changes them? I'm not loosing
>any paragraphs either?
>
>Bjoernke




More information about the use-livecode mailing list