'un-style' clipboard text...
Jan Schenkel
janschenkel at yahoo.com
Tue Mar 2 01:59:36 EST 2004
--- Chipp Walters <chipp at chipp.com> wrote:
> I would like to remove any style from the clipboard
> text. Any idea how to do
> this?
>
> New stack, create two fields
> Set the text formatting of the 2 fields to 2
> different settings.
>
> Say, fld 1 is Arial 14 pt
> fld 2 is Courier New 24 pt
>
> Type some text into fld 1. Now cut and paste into
> fld 2.
>
> I want the text in fld 2 to be Courier New 24 pt
> *after* the paste. I don't
> want to reset any properties for fld 2. Any idea how
> to do this efficiently?
>
> Currently, my kludge work-around is after paste do:
>
> lock screen
> put the vScroll of fld 2 into tV
> put fld 2 into t
> put t into fld 2
> set the vScroll of fld 2 to tV
> unlock screen
>
> Seems like there's got to be an easier way?
>
> --Chipp
>
Hi Chipp,
My solution is a bit if a kludge as well, but it does
the trick, also after drag&drop :
--
on dragDrop
send "UnformatMe" to me in 15 milliseconds
pass dragDrop
end dragDrop
on pasteKey
send "UnformatMe" to me in 15 milliseconds
pass pasteKey
end pasteKey
on UnformatMe
set the text of me to the txt of me
end UnformatMe
--
Of course you can turn this into a fronscript and have
it work everywhere.
Hope this helped,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster
http://search.yahoo.com
More information about the use-livecode
mailing list