JSFiddle - React, Tailwind, and code Playground
HTML
<textarea rows="10" cols="5">10AFFURL</textarea>
<textarea rows="10" cols="5">20AFFURL</textarea>
<textarea rows="10" cols="5">30AFFURL</textarea>
JavaScript
$(function(){
var prodUrl = "test.com";
$("textarea").each(function(){
this.value = this.value.replace("AFFURL",prodUrl );
});
});