copy to clipboard

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Manuel

    copy to clipboard

    hello everyone

    in my website i use the methods ".execCommand(' SelectAll')" and
    ".execCommand(' Copy')" to copy a defined area to the clipboard, that works
    fine, but now i wanted to make my website compatible with macintosh.

    the same functions dont work on a mac, so i am asking if anyone knows how
    the "copy to clipboard" function (for text and images!) works on macintosh
    or if it works at all on a mac.

    thank you very much

    Manuel from Switzerland


  • Martin Honnen

    #2
    Re: copy to clipboard



    Manuel wrote:

    [color=blue]
    > in my website i use the methods ".execCommand(' SelectAll')" and
    > ".execCommand(' Copy')" to copy a defined area to the clipboard, that works
    > fine, but now i wanted to make my website compatible with macintosh.[/color]

    execCommand is IE/Win only I think (unless you want to use it in an
    editable iframe where Mozilla since 1.4 supports it too) so it is not
    Macintosh that is the problem but simply it depends on whether the
    browser supports the API document.execCo mmand.
    [color=blue]
    > the same functions dont work on a mac, so i am asking if anyone knows how
    > the "copy to clipboard" function (for text and images!) works on macintosh
    > or if it works at all on a mac.[/color]

    I don't think any browser but IE/Win supports execCommand and I doubt
    any browser besides IE/Win does expose the clipboard to unprivileged
    script. I am pretty sure neither Opera nor Mozilla provide clipboard
    access, I only know about the Windows versions but as both produce
    cross-platform browsers I don't think their Mac versions differ.

    --

    Martin Honnen

    Comment

    Working...