Copying HTML Tables as Text, Markdown, and CSV

Earlier today and in a non web-related conversation, I saw someone talk about copying tabular data into different formats, like plain text and CSV. It got me thinking – this could be a useful feature for web sites and surely something pretty trivial to do in JavaScript. So I whipped up a quick demo. First, I added a table of course: <table id="table1"> <thead> <tr> <th>Name</th> <th>DOB</th> <th>Gender</th> <th>Breed</th> </tr> </thead> <tbody> <tr><td>Whiskers</td><td>2019-03-14</td><td>Male</td><td>Maine Coon</td></tr>... more →
Posted in: JavaScript