JSFiddle - React, Tailwind, and code Playground
by Town
HTML
<input type='checkbox' name='power_convention[]' value='SOME VALUE #1' />
<input type='checkbox' name='power_evidence[]' value='SOME VALUE #2' />
<textarea id="elm1" name="comments" rows="15" cols="80" style="width: 80%"></textarea>
JavaScript
$('input[name^="power_"]').click(function() {
// assuming you only want the value if the checkbox is being ticked
// not when it's being unticked
if ($(this).is(":checked")) {
// to overwrite
$('#elm1').val("<h3>" + this.value + "</h3><br />");
// to append
//$('#elm1').val(
// $('#elm1').val() + "<h3>" + this.value + "</h3><br />"
//);
}
});