'TextEditor multi-line display on website losing newlines
When i save data entered from a TextEditor on my IOS app and then preview that text on website version it doesn't display the newline and consider the whole description as a single line text.
- my qustion is : how to display the same description with multiline on the website exactly as shown on the the iphone app using TextEditor ?
Solution 1:[1]
after some Research i've found this solution :
let descriptionInputHtmlForm = descriptionInput(of: "\n", with: "<br>", options: .literal, range: nil)
Before sending the entered input to the Database we do some modifications by replacing the \n with br inside <> in this way the html will detect new line break
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ilies Ould menouer |
