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

feat: added placeholder example #1252

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Conversation

ezhil56x
Copy link
Contributor

Fixes #1242
/claim #1242

Added an example for placeholder

image

Copy link

vercel bot commented Nov 16, 2024

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Nov 20, 2024 3:50pm
blocknote-website ✅ Ready (Inspect) Visit Preview Nov 20, 2024 3:50pm

Copy link

vercel bot commented Nov 16, 2024

@ezhil56x is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

@Blapi
Copy link

Blapi commented Nov 17, 2024

This only works for en locales, if your locale is set to french it won't work, how would you handle that depending on the user locale then?

@ezhil56x
Copy link
Contributor Author

@Blapi Updated, now the user locale can be set

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

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

nice, some requests commented, then we should be good

const editor = useCreateBlockNote({
dictionary: {
...locales[userLocale],
placeholders: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Besides the default, please also show how you can change the "heading" placeholder

Copy link
Collaborator

Choose a reason for hiding this comment

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

add a comment to explain code

// We override the `placeholders` in our dictionary

examples/01-basic/11-placeholder/App.tsx Outdated Show resolved Hide resolved
examples/01-basic/11-placeholder/App.tsx Outdated Show resolved Hide resolved
examples/01-basic/11-placeholder/README.md Outdated Show resolved Hide resolved
playground/src/examples.gen.tsx Outdated Show resolved Hide resolved
examples/01-basic/11-placeholder/README.md Outdated Show resolved Hide resolved
@ezhil56x
Copy link
Contributor Author

2024-11-18.10-06-45.mp4

@YousefED Updated my PR

@matthewlipski matthewlipski merged commit 65f15bb into TypeCellOS:main Nov 20, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to change the placeholder
4 participants