CodingForums.com
>
:: Client side development
>
JavaScript programming
> Text is Carriage returns replace with <p>
PDA
View Full Version :
Text is Carriage returns replace with <p>
ksridhar69
04-01-2003, 04:38 PM
In textarea people are using carriage returns. Is there any solution to replace carriage returns with <p> tag?
liorean
04-01-2003, 05:00 PM
str=str.replace(/\r\n|\n|\r(?!\n)|\u0085/g, '<p>');
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.