One of the features in my app requires users to copy and paste tab delimited text. I need to convert this text into a table where each new column is represented by a tab and each new row is indicated by a new line.
I've managed to create a list for each new line in the pasted text, but now I'm wondering how I can extract an array from tab delimited text.
<div ng-app>
<textarea ng-model="items" ng-list="/\n/"></textarea>
<table>
<tbody>
<tr ng-repeat="item in items">
<td>
{{item}}
</td>
</tr>
</tbody>
</table>
</div>
Unfortunately, I can't demonstrate pasting tab delimited text here without it being reformatted. To preserve the format, you can copy and paste from Notepad or a spreadsheet.