I'm trying to replace text every time I've an input change.
Here's an example: https://jsfiddle.net/ewdp3Lnr/
$("[name='replacer']").on('change paste keyup', function() {
PRO_Content = $('#content').html();
PRO_Content = PRO_Content.replace('####', $("[name='replacer']").val());
$('#content').html(PRO_Content);
});
It's working but only for the first change detected.
But not for the second, third, ...
Could you point me in the right direction?
Thanks.
PRO_Content = $('# content').html();