Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding html tags if editor is empty #12

Closed
Phantomrider opened this issue Jan 25, 2018 · 1 comment
Closed

Adding html tags if editor is empty #12

Phantomrider opened this issue Jan 25, 2018 · 1 comment
Assignees
Labels

Comments

@Phantomrider
Copy link

When you submit a form with empty editor it adds <div><br></div> to the POST, which is a bummer, since you can't check very efficiently if it's really empty.

@webfashionist webfashionist self-assigned this Jan 25, 2018
@webfashionist
Copy link
Owner

The reason for the <div><br></div> tags is in fact a bug fix for the case, that no container is created for the first paragraph.
So it won't be possible to remove it.

To check if the content is empty, you might want to strip all the HTML tags and check if the string is empty after doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants