facebook / facebook/lexical

Explore reworking emptiness checks

Open
#3,939 0 comments 3 reactions 0 assignees View on GitHub
core enhancement
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

We have EditorState.isEmpty, ElementNode.isEmpty, $isRootTextContentEmpty, $isRootTextContentEmptyCurry, etc.

The logic is slightly different for each - can we clean this up, or at least clarify the semantics of "emptiness" (is it an empty root? a root with one child? does the child have to be a paragraph?)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.