When I insert a value to my textbox I get a <br />
tag when I press Enter to insert a line break. How should I remove the <br />
tag and replace with a line break using jQuery.
$('#dbDocumentFooter').keyup(function(e){
var TextToBeDisplayed = $(this).val();
if(e.keyCode == 13 && !e.shiftKey) {
TextToBeDisplayed = $('#dbDocumentFooter').val().replace("\n", "<br />", "g")
$('#dbDocumentFooter').val(TextToBeDisplayed);
}
});
, – Nick May 20 '16 at 19:19