make text/html content of webview editable

I am working on an AppleScript Studio application that fetches and posts content from a remote MySQL database using XML-RPC calls. I have this content returned to a window with a webview widget.

It displays the content beautifully, appropriately sizing and formatting text and images, much nicer for non-skilled end users to look at than returning the content to a text view inside a scroll view, but… (yes, there is always a catch, isn’t there)

I can not figure out how to set the content of that webView to “Editable”. I have heard that this can be done, for instance, Mac OS X uses a webView for the text area when composing and reading mail messages. Of course is also written in objective-C. Is this to much to ask of AppleScript? I have always been a fan of scripting languages. I have been slowly (painfully slow) learning Cocoa in Xcode over the last several months, still without a real workable knowledge of anything at all, but I became fairly proficient in PHP and OO PHP in a matter of 5-6 weeks. It is probably a defect in my brain, but I just “get” appleScript. Just playing with it for a few hours I created apps and gadgets that I couldn’t even begin in Cocoa. !

Can I make a webView object editable in AppleScript Studio?

Kind regards, and my compliments to this tremendously useful site and it’s willing and helpful community. Honored to be a part of this. Hope to contribute something useful soon!

Dr. Scotty Delicious

Hi Scotty,

you can set it with a ‘call method’:

call method "setEditable:" of (view "webview" of window "main") with parameters {true}


You are a gentleman and a scholar.
I was trying to set the method call as:

set myWebView to view "editWebView" of window "editWindow"
call method "setEditable:" of myWebView with parameter "YES"

but it wasn’t working.

Thank you for your clarification and for sharing your wisdom. It is greatly appreciated

Dr. Scotty Delicious