[Mozile] Paste Bin
James A. Overton
james at overton.ca
Thu Sep 14 09:59:46 EDT 2006
Hi Reto,
A textarea paste bin would certainly work. Another possibility is an
iframe or second window with an HTML document and designMode turned
on. Then you'd be able to get HTML from the clipboard as well as
text. You might even be able to use a hidden iframe.
(The main problem with pasting only occurs in Mozilla browsers. With
an HTML document and contentEditable in IE, Safari, and Opera, you
can use document.execCommand("paste") to get at the clipboard. In
Mozilla you have to set the whole document to use designMode, and
then use execCommand(). If your document isn't HTML, you can't use
designMode. You can also access the clipboard through XPCOM, but that
requires privileges.)
It would be good to have a proper paste system. Are you
volunteering? :)
James
More information about the Mozile
mailing list