Regular. Instead of a space / enter, it truncates the word on some phones, what's the problem?
-
Good day everyone!
Essence, on samsungs (android 8,9,10), xiaomi (android 9), ZTE (android 9), the following code
this.space_text = this.main_text.replace(/ /g, '<br/>') this.space_text = this.space_text.replace(/\r\n|\r|\n/g, "< br/ >")
instead of replacing the space and the enter with& lt; br / & gt;
, it just removes the last word, but if you put a space at the end, everything is ok.
The text is entered dynamically into textarea and outputted to the p tag, via v-model.
Thank you!JavaScript Eleanor Mathews, Oct 30, 2020
0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!