Skip to content

feat: added placeholder example - #1252

Merged
matthewlipski merged 2 commits into
TypeCellOS:mainfrom
ezhil56x:placeholder
Nov 20, 2024
Merged

feat: added placeholder example#1252
matthewlipski merged 2 commits into
TypeCellOS:mainfrom
ezhil56x:placeholder

Conversation

@ezhil56x

Copy link
Copy Markdown
Contributor

Fixes #1242
/claim #1242

Added an example for placeholder

image

@vercel

vercel Bot commented Nov 16, 2024

Copy link
Copy Markdown

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

@vercel

vercel Bot commented Nov 16, 2024

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@Blapi

Blapi commented Nov 17, 2024

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

@Blapi Updated, now the user locale can be set

@YousefED YousefED left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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

Comment thread examples/01-basic/11-placeholder/App.tsx Outdated
Comment thread examples/01-basic/11-placeholder/App.tsx Outdated
Comment thread examples/01-basic/11-placeholder/README.md Outdated
Comment thread playground/src/examples.gen.tsx Outdated
Comment thread examples/01-basic/11-placeholder/README.md Outdated
@ezhil56x

Copy link
Copy Markdown
Contributor Author
2024-11-18.10-06-45.mp4

@YousefED Updated my PR

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.

How to change the placeholder

4 participants