clipboardData.setData

Discussion in 'Javascript' started by Tom de Neef, Feb 24, 2011.

  1. Tom de Neef

    Tom de Neef Guest

    Using IE, I can use
    clipboardData.setData("Text","<html>"+someElement.innerHTML+"</html>");
    Pasting to Excel works fine: <table> data is converted to an Excel table.
    But when I paste to Word, it takes the data as text and presents all the
    html tags as part of the text.
    I gather from MSDN that "Text" and "URL" are the only possible values for
    the first argument of setData().
    For Mozilla I found examples of specifying the format of the clipboard data.

    I am looking for ways of copying html to Word, so that the formatting
    information is maintained.
    Thank you for any suggestions,
    Tom
     
    Tom de Neef, Feb 24, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dwhalen
    Replies:
    4
    Views:
    284
    Xavier
    Feb 22, 2007
Loading...

Share This Page