How To Ensure Only Plain Text Editing Is Allowed In Field
Phil Davis
davis.phil at comcast.net
Fri May 12 13:20:18 EDT 2006
Hi Ivan and Bill,
I wasn't going to say anything, but it looks like this thread is closing
and no one else brought it up, so...
I believe this handler of Bill's:
-- prevent styled text
on exitField
set the htmlText of me to me
end exitField
... should be:
-- prevent styled text
on closeField
set the htmlText of me to me
end closeField
The 'exitField' message is sent when the cursor leaves the field and no
changes were made. If the field contents HAVE been changed, 'closeField'
is sent instead.
Now the script won't give you any unwanted surprises!
Thanks.
Phil Davis
Ivan Wong wrote:
> Bill Marriott <wjm at ...> writes:
>
>
>>Attaching the following script to your field should do the trick.
>>
>
>
> Hi Bill,
>
> Many thanks for sharing your detailed tips.
>
> It is exactly the advice I was looking for.
>
>
> best,
> Ivan
More information about the use-livecode
mailing list