Skip to content Skip to sidebar Skip to footer

How To Copy Table Html (data And Format) To Clipboard Using Javascript (microsoft Edge Browser)

Problem: I have attached my code for copy data and format of a html table into clipboard like below. This code work as I expected on chrome but does not on microsoft edge. I trie

Solution 1:

I tried to test the issue and I found that I can produce the issue.

If your paste settings in Word and Excel are set as Keep Text only then you can see that table is not in format.

Generally when you paste using CTRL + V then it use Keep Text only formatting. I suggest you to paste the table using right click of mouse -> paste (Keep source formatting) option.

enter image description here

Notepad does not have any formatting option, so we cannot fix this issue for Notepad. It looks like this is by design in MS Edge browser.

For other work around, you can try to test the issue using MS Edge (Chromium) browser. Pasting the table will keep the formatting in Notepad, Word and Excel.

Post a Comment for "How To Copy Table Html (data And Format) To Clipboard Using Javascript (microsoft Edge Browser)"