Skip to content

fix: placeholder improvements #1439

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

Merged
merged 2 commits into from
Feb 17, 2025
Merged

fix: placeholder improvements #1439

merged 2 commits into from
Feb 17, 2025

Conversation

YousefED
Copy link
Collaborator

@YousefED YousefED commented Feb 17, 2025

Placeholder improvements:

  • correctly scope placeholders per editor
  • add support for an "empty document" placeholder

Example: https://blocknote-git-fix-improve-placeholders-typecell.vercel.app/basic/custom-placeholder

I'm not sure the current API is great (the way they're passed in via the dictionary), but I think we can address this separately

closes #703
closes #1200

Copy link

vercel bot commented Feb 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Feb 17, 2025 0:27am
blocknote-website ✅ Ready (Inspect) Visit Preview Feb 17, 2025 0:27am

? `[data-is-empty-and-focused]`
: ``;
try {
// FIXME: the names "default" and "emptyDocument" are hardcoded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure how important this is

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this relates to;

I'm not sure the current API is great (the way they're passed in via the dictionary), but I think we can address this separately

Copy link
Contributor

@nperez0111 nperez0111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@YousefED YousefED merged commit 67d08a8 into main Feb 17, 2025
5 checks passed
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.

Placeholder for the entire content New placeholders option doesn't work with multiple editors
2 participants