Subj : Re: midas, execCommand, cut, copy & paste To : netscape.public.mozilla.jseng,netscape.public.mozilla.xpcom From : Benjamin Smedberg Date : Wed Apr 16 2003 07:59 am > This boggles my mind. execCommand works fine in mozilla 1.4a, and in > the midas demo at http://www.mozilla.org/editor/midasdemo/ cut, copy > and paste works fine. When I try to use these functions myself, > however, they don't - they generete an > NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED exception with the message > "Access to XPConnect service denied" code: "1011". At http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/init/all.js#456 pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org"); So to use this in your own application you would need to enable security... try one of the following: netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); (this might work for copy) netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); (this might work for cut/paste) netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); (this might just work) If you're doing this from website JS (as opposed to the local filesystem), you will need a signed script. --BDS .