I'm writing a HTML editor in JavaScript using the features of Mozilla 1.3 Beta. When performin a Copy/Paste action I have to get the content of the system clipboard, extract the text (cleaning the HTML
tags) and perform a custom action of pasting text instead of HTML
(actually using the Range object).


I've found a script here to get the content of the clipboard:

http://www.codebase.nl/index.php/command/viewcode/id/174

but the problem is thet when I do:

netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');

there is an error like this:

Error: [Exception... "'enablePrivilege not granted' when calling method:
[nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)"  location: "<unknown>"  data: no]

I've found that the problem is modifing the prefs.js config file and
permit the use of UniversalXPConnect to script in pages from a specific
codebase. Can anyone help me?

Thanks, Gaetano Bigliardi
mailto:[EMAIL PROTECTED]




Reply via email to