0

I'm trying to copy content from input field and paste in word doc. It's working for Chrome, Edge but not in Firefox. How to solve this problem copy and paste from input field to word doc using Firefox browser.

Here is my code

var selection = window.getSelection();

var splitDatas = selection.toString().replace(/,/g, ' ');

var splitData = splitDatas.split(" ");

console.log("splitData = ", splitData);
  • Does this answer your question? [window.getSelection() of textarea not working in firefox?](https://stackoverflow.com/questions/20419515/window-getselection-of-textarea-not-working-in-firefox) – Can O' Spam Sep 13 '22 at 11:09

0 Answers0