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

Include children in placeholder plugin #1416

Merged
merged 1 commit into from Sep 8, 2021
Merged

Include children in placeholder plugin #1416

merged 1 commit into from Sep 8, 2021

Conversation

nickdbush
Copy link
Contributor

Adds an option to the placeholder plugin to include children in the search for empty nodes.

Consider the use case in which there is a header node with title and subtitle nodes. Currently, the header node will be the only one that receives the .is-empty class. Therefore, typing something into the title node makes the subtitle placeholder disappear, which is confusing to users. With the modifications in this PR, the search for empty nodes can be continued to children. Therefore, the subtitle node would retain its placeholder until modified.

I'd like to get some feedback on this before updating the docs and such.

Adds an option to the placeholder plugin to include children in the search for empty nodes.
@philippkuehn philippkuehn marked this pull request as ready for review September 8, 2021 07:37
@philippkuehn
Copy link
Contributor

Oh sorry for that delay. Looks good!

@philippkuehn philippkuehn merged commit 1799b90 into ueberdosis:main Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants