I have a textarea that I am selecting text from to edit with a text range, i want to find the returns/new lines and add a list tag:
Where the *** is in the above code is where I need to detect teh returns/line feeds.
I have tried using \n and also String.fromCharCode(13) but neither works.
If i were using ASP i would use chr(13), is there and equivilent function in javascript?
Code:
var textSelected = document.all.editbox.document.selection.createRange()
var addList = textSelected.text;
addList.replace(***,'<li>')
Where the *** is in the above code is where I need to detect teh returns/line feeds.
I have tried using \n and also String.fromCharCode(13) but neither works.
If i were using ASP i would use chr(13), is there and equivilent function in javascript?