I was wondering if it was possible to format text when it is copied/selected so the content of a <table>
could be formatted to fit a csv
format i.e. separate every cell by a comma?
If so, how do you proceed to do that? I thought of using Regex, but my data can be very complex
Found nothing on the web on this. You are welcome to use jQuery and JavaScript`.
<table style="width:100%">
<tr>
<td>Traverse Avant de Bas</td>
<td>2016/08/18 à 08:19:05</td>
<td>Omal</td>
<td>1.01-BQ</td>
<td>BOYLSTON 27D</td>
</tr>
<tr>
<td>Traverse Avant de Bas</td>
<td>2016/08/18 à 08:19:05</td>
<td>Omal</td>
<td>1.01-BQ</td>
<td>BOYLSTON 27D</td>
</tr>
<tr>
<td>Traverse Avant de Bas</td>
<td>2016/08/18 à 08:19:05</td>
<td>Omal</td>
<td>1.01-BQ</td>
<td>BOYLSTON 27D</td>
</tr>
<tr>
<td>Traverse Avant de Bas</td>
<td>2016/08/18 à 08:19:05</td>
<td>Omal</td>
<td>1.01-BQ</td>
<td>BOYLSTON 27D</td>
</tr>
</table>
If you copy this table you end up with a lot of space between each data.
EDIT
Even though the link provided by mplungjan anwser my specific problem, i am still wondering how one could format a copied string.