Forcing 'paste' to paste plain text

Richmond richmondmathewson at gmail.com
Wed May 6 12:07:51 EDT 2015


On 06/05/15 19:00, Graham Samuel wrote:
> I want to make sure that any text pasted by my ‘paste’ menu gets pasted as plain (unstyled) text whether or not it is styled to start with. Probably a dumb question but I can’t quite see how to do this with ‘the clipboardData’. Can anyone suggest how this should be done?
>
> TIA
>
> Graham
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

Try this:

on mouseUp
    paste text into fld "myTEXT"
    set the textStyle of fld "myText" to empty
end mouseUp

Richmond.




More information about the use-livecode mailing list