We upgraded to FF 19.0 from 12.0 and the clipboard access is completely restricted and I am not able to get data from clipboard.
In earlier vesions of FF, the following used to work.
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var clip = Components.classes["@mozilla.org/widget/clipboard;1"].getService(Components.interfaces.nsIClipboard); var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
UseCase:
For input text fields, when multi-line text is pasted, I would like to replace with separator of my choice instead of default space char as separator.
E.g: test1\n test2\n test3
On pasting this text in input text field in FF, O/p seen: test1 test2 test3 O/p required: test1,test2,test3 (when separator is ',') test1;test;test3 (when separator is ';')
Requirement:
The pasted text should be modified even before it is pasted to the text field and the only way seems to be access to clipboard.
I tried the following links but did not help.
https://support.mozilla.org/en-US/questions/948379
http://stackoverflow.com/questions/14809226/cut-copy-and-paste-is-not-working-for-firefox-15-onwords
I have tried modifying the user pref to allow clip board which did not work.
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", mydomain);
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
I am not supposed to use flash objects to get access to clipboard (ZClip or ZeroClipboard).
Appreciate your responses. Thanks in advance.