0

We are developing an application that relies heavily on the Tabulator library. We want to support 2 different locales for the numbers' format, the Dutch one and the UK one.

Main action that the clients do is pasting data from Excel file directly into the table. We want to extract some metadata from the Excel file using window.clipText = e.clipboardData.getData("text/html"); which will give us the decimal and thousands separator and thus providing us with the correct locale.

Now we are looking for a solution where we can catch the pasting event and extract the metadata from the Excel file before the default parser extracts the text.

Is this possible?

Alek
  • 56
  • 3
  • Does this help: http://tabulator.info/docs/4.9/clipboard#paste-parser – Timur Aug 25 '21 at 17:40
  • Hi Tim, thanka for the answer! But this does not help because the custom parser just gets the formatted output of the original, default parser. The point is to get the html content of the pasted clipboard before the built in parser takes the text content – Alek Aug 25 '21 at 18:29
  • There is also a `clipboardPasted` callback which seems to have the clipboard string. Not sure it will have the data you are looking for but may be worth a look: http://tabulator.info/docs/4.9/callbacks#clipboard – Timur Aug 25 '21 at 19:12
  • Hi Tim, no. This has the parsed clipboard string. And I need the clipboard object itself. I want to get the data in html format. I edited the question's topic so it would be more clear – Alek Aug 26 '21 at 08:06

0 Answers0