JSFiddle - React, Tailwind, and code Playground
HTML
<table id="olympvm_cage" class="form-table">
<thead>
<tr>
<td><button id="add-olympvm">Add Player</button>
</td>
</tr>
</thead>
<tbody></tbody>
</table>
<script type="text/html" id="blank_data">
<tr>
<td colspan="2">
<h3>Video COUNT_KEY</h3>
</td>
</tr>
<tr valign="top">
<th scope="row">FlowPlayer Config</th>
<td>
<textarea name="_olympvm_settings[COUNT_KEY][config]" rows="6"
cols="50"></textarea>
<p class="description">This is the raw FlowPlayer config.</p>
</td>
</tr>
<tr valign="top">
<th scope="row">User prompt intervals</th>
<td>
<input type="text" name="_olympvm_settings[COUNT_KEY][prompt]" class="regular-text" value=""/>
<p class="description">Single value will repeat every set value. Comma separated will loop over each value then stop.</p>
</td>
</tr>
<tr valign="top">
<th scope="row">Code for Post</th>
<td>
[olympvideoplayermonitor vm="COUNT_KEY"]
</td>
</tr>
</script>
JavaScript
(function( $ ) {
var i = 0;
$("#add-olympvm").click(function() {
var section = $("#blank_data").text();
section.replace(/COUNT_KEY/g, i);
$("#olympvm_cage tbody").append(section);
i++;
});
}( jQuery ));