How to get the new line break if there are some in the text area
By : user3302926
Date : March 29 2020, 07:55 AM
I hope this helps you . Line breaks are interpreted as \n. With javascript you can use regular expression to detect the new line character. code :
/\n/
var newStr = "String with line breaks".replace(/\n/g,"<br />");
|
Using a line break in a text area 'value'
By : Prajwal.A
Date : March 29 2020, 07:55 AM
With these it helps try with \n instead of , and also, apply html_safe only to @message.content, not to the whole string: code :
<%= f.input :content, :as=>:text, :label => "Reply", :input_html => { :value=> "\n\nOriginal Message: " + @message.content.html_safe } %>
|
Line break in Text Area
By : CrucialUpdat3
Date : March 29 2020, 07:55 AM
|
Line break issue when displaying file contents in html text area - javascript PHP
By : azizi
Date : March 29 2020, 07:55 AM
wish helps you You need to escape the \n character for ajax to \\n So before you echo $display in findNotes.php you should insert: code :
$display=str_replace("\n", "\\n", $display);
|
Add a line break to a html text area
By : Fierda Kurnia Cahya
Date : March 29 2020, 07:55 AM
Hope this helps Try using the HTML entities for line feed
and carriage return
.
|