stripping style from pasted text...
Jim Ault
JimAultWins at yahoo.com
Wed Nov 7 12:38:13 EST 2007
Wouldn't the following work for you?
> on pasteKey
> if the clipboard is "text" then
get the clipboardData["text"]
set the clipboardData to it
> end if
> paste
> end pasteKey
Jim Ault
Las Vegas
On 11/7/07 8:45 AM, "Andre Garzia" <andre at andregarzia.com> wrote:
> Hello Friends,
>
> newbie question here. I have many fields where the user can paste
> text. The problem is, I don't want the text to be styled, I want to
> paste as plain text. I've added this to a frontscript:
>
> on pasteKey
> if the clipboard is "text" then
> ## Get rid of text styles...
> set the clipboardData["html"] to empty
> set the clipboardData["rtf"] to empty
> end if
> paste
> end pasteKey
>
> but so far the text still paste with styles... any clue out there? The
> field can contain styles but not the pasted text because, I want to
> control how styles are applied to get rid of silly stuff such as
> <font> from appearing in my htmltext properties.
>
> TIA
> Andre
More information about the use-livecode
mailing list