[TIP] How to ensure plain pasted text
Björnke von Gierke
bvg at mac.com
Sat Oct 25 06:23:39 EDT 2008
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
PS: Here the second version of my code again, because the original one
can't really work in a real project:
on commandKeyDown Vkey
if Vkey = "v" and the selection is not empty then
put the clipboardData["text"] into the selection
else
pass commandKeyDown
end if
end commandKeyDown
On 24 Oct 2008, at 19:06, Hugh Senior wrote:
>> I'm not sure this holds true for win or linux (or older rev versions
>> then 2.8.1), but on mac os x, when there's styled text in the
>> clipboard, both the html and the text values of the clipboarddata
>> array hold their respective value.
>>
>> Therefore this proved sufficient in one of my projects:
>>
>> on commandKeyDown Vkey
>> if Vkey = "v" then
>> put the clipboardData["text"] into the selection
>> end if
>> end commandKeyDown
>
> I believe independent arrays on OSX, as with other platforms, are not
> supported and changing one will change the others to suit, BvG. You
> would
> also lose any paragraph returns, I think.
--
official ChatRev page:
http://bjoernke.com/runrev/chatrev.php
Chat with other RunRev developers:
go stack URL "http://bjoernke.com/stacks/chatrev/chatrev1.3b3.rev"
More information about the use-livecode
mailing list