L
L
LyoneNET2017-04-14 23:32:48
JavaScript
LyoneNET, 2017-04-14 23:32:48

How to remove characters \r\n\r\n from TinyMCE after form submission?

Good evening
I have a problem with tinymce. After submitting the form, in addition to the text, characters \r\n\r\n appear in the text field. Please tell me how to get rid of these characters.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Artamonov, 2017-04-15
@ArtamonovDenis

To clear the text, you can use the php function - str_replace
Example:
$text = 'some text \r\n';
$text = str_replace(array('\r', '\n'), '', $text);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question