-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Description
Currently Post#isBlank is false if it has a section, even if there's no content in that section.
I'm currently doing this to check if a post has blank content:
function editorPostIsBlank(editor) {
const post = editor.post;
if (post.isBlank) {
return true;
}
const sections = post.sections;
if (sections.isEmpty) {
return true;
}
if (sections.length === 1 && sections.head.isBlank) {
return true;
}
return false;
}Metadata
Metadata
Assignees
Labels
No labels