-
Notifications
You must be signed in to change notification settings - Fork 16
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
Is there an easy way to check if a rich text field is empty? #27
Comments
I quickly created a function to check if the rich text field is not empty. Let me know if I'm missing something obvious
|
My attempt in Typescript:
|
The
|
On the same topic, is there a way to check if there is an empty line? For example, if an editor presses Enter and leaves the first line without content or forgets to remove the last line |
I wrote this utility function, hopefully it could be of help to someone:
|
I'm not sure if this is in the scope of this library, but it might be quite useful if we provide a function to check if the rich text field is empty or not.
This is what an empty rich text field looks like at the moment
Coming from other headless CMS, I know that there might be a couple of different edge cases which we might need to cover.
The text was updated successfully, but these errors were encountered: