Why TinyMCE’s getContent() returns empty string if content is several space?
If my content contain only spaces, then getContent() method return empty string.
I want count up chars in TinyMCE’s body.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Before TinyMCe returns the editors content this is called in Editor.js:
This removes spaces at the beginning and end of your content, therefor your getContent() is empty when you only have spaces inserted.