W3C home > Mailing lists > Public > www-svg@w3.org > April 2004

Re: Clipboard access through events

From: Doug Schepers <doug@schepers.cc>
Date: Tue, 6 Apr 2004 16:05:05 -0400
Message-ID: <00ac01c41c12$75004ec0$64053942@Raven>
To: "Jan-Klaas Kollhof" <keyjaque@yahoo.com>, <www-svg@w3.org>

As I've mentioned before, I'd also like to see clipboard access. Obviously,
security is an issue, and I would not object to an explict warning to the
user; I don't think that it would be too onerous to have an initial
permission box pop up, and I'd rather that SVG not get a reputation as a
security risk.

At the same time, however, I do not like the idea of there being fuctions
that are only accessible through the context menu of the viewer; I'd like to
see all these functions exposed through script (ASV3 has several of these:
Open, OpenNew, ZoomIn, ZoomOut, OriginalView, Quality, Pause, Mute, Find,
FindAgain, Copy, CopySVG, ViewSVG, ViewSource, SaveAs, SaveSnapshotAs). Why
not let the user decide what permissions the UA and the authored script
have?

Currently in IE, you (sometimes) have access to the clipboardData object,
but this is very limited. The format of this data is only "text" or "url".
As far as I can tell, neither of these formats is where a raster picture,
for example, is stored when I select "Copy" on  IE's context menu for a
photo. Therefore, I could never paste a photo into an SVG, or copy a
rasterized version of an SVG image into the clipboard, using this method.
I'd like deeper and more consistant cross-platform access.

Getting the result of something like SaveAsRaster, and copying it to the
clipboard would allow us to make applications where we would not have to
"Paste special" in Word or other desktop apps; the user could simply copy
and paste into their favorite raster-friendly app. It would be great to be
able to store multiple formats in the clipboard (an SVG version, a raster
version, and a code-text version of the same SVG image, for example) where
the appropriate one is pasted into the target, but that's getting pretty
picky, and I don't know how well that would take cross-platform.

As Tim said, this is one more thing that would open up SVG to be a true
application framework.

My two cents-
-Doug


Jan-Klaas Kollhof wrote:

|
| Hi,
|
| >What if the author wanted to make some toolbar
| buttons in >their application for copying and
| pasteing?
|
| That is a problem, even special attributes would not
| work, because one could emulate a click event on that
| button by just dispatching a click event on that
| element.
| Also one could always make then any button usable for
| pasting without the user knowing.
|
| Maybe then the approach of accessing the clipboard
| directly should be used with a warning.
| clipborad.dispatchPasteEvt() might dispatch a paste
| event after the user has then given his OK.
| It's not very pretty but would work without creating
| any security holes.
| I would consider this as a fallback but not as default
| behavior.
|
|
| Jan
Received on Tuesday, 6 April 2004 16:05:13 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:27 GMT