Javascript String htmlLineBreak()

Description

Javascript String htmlLineBreak()

String.prototype.htmlLineBreak = function() {
 let target = this;
 return target// www  . j a v a2 s .co m
  .replaceAll('\r\n', '<br/>')
  .replaceAll('\r', '<br/>')
  .replaceAll('\n', '<br/>');
};



PreviousNext

Related