Sometimes we require to display message conversion in your angularJS App, But if you are using textarea for write comment or something then text display on same like without line break. split (): is a predefined JavaScript function that splits a string into an array using a parameter. They do not work. If value is Joel\nis a slug, the output will be

Joel
is a slug

. Then, use the nl2br () function to create
s, or you can explode () it for
or \n. I would like to add a line break to the end line of text so the appended text is on a new line. Look at the images: When I insert a post like this: I get this: When I insert a post like: The results are like: I want to insert like in img1 and get a result like in img4. To get a new line, you must insert
elements. But its adding a lots of line breaks and paragraphs (specially copying and pasting from word file ) after every save. Approach: This task can be achieved by using some predefined array and string functions provided by JavaScript. Textarea value, This end tag is always required even if the field is initially blank. How to: 1 Get each line from this textarea ( $text) and work with them using foreach ()? 2 Add
to the end of each line, except the last one? 3 Throw each line to an array. More ... The string can be all in Chinese characters; The string can be all in English characters; The string can be a mixture of English and Chinese; There was having following criteria - Auto-run code Only auto-run code that validates ... jQuery Mobile 1.2.0 jQuery UI 1.9.2 Framework