Skip to content

fix: placeholder defined in code instead of css #188

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

Conversation

achrefBoukhili
Copy link

No description provided.

@vercel
Copy link

vercel bot commented May 6, 2023

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

Name Status Preview Comments Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2023 6:00pm
blocknote-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2023 6:00pm

Copy link
Collaborator

@matthewlipski matthewlipski left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I'm not sure it makes sense to merge these changes at the moment though, since we're still not set on how we want to implement default styling for BlockNote. Right now we're ok with using CSS modules, though I think this might change. We'll probably revisit this when we're sorting out localization for the whole editor, including menus. @YousefED Thoughts?

translation: {
placeholder: "Geben Sie Text ein oder geben Sie '/' für Befehle ein",
heading: "Überschrift",
list: "Aufführen",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure some of the translations are 100% consistent

@@ -27,11 +27,11 @@ NESTED BLOCKS
margin-left: 1.5em;
}

.blockGroup .blockGroup > .blockOuter {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's better to keep the formatting as it was. Admittedly the CSS isn't very readable at the moment, but it would make it much easier to keep track of the more important changes in the PR.

it: {
translation: {
placeholder: "Inserisci il testo o digita '/' per i comandi",
heading: "intestazione",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be capitalized

@YousefED
Copy link
Collaborator

YousefED commented May 8, 2023

This is great @achrefBoukhili! My thoughts:

  • I think we should do i18n in a different PR. It's definitely a nice addition, but then I feel we should also translate other parts of the codebase (not just the placeholder).
  • Why don't we pass the block type to this.options.placeholder and allow this placeholder function to be passed in from the BlockNoteEditor options? That way, everything is user customizable 🤙 (including different languages)

Let me know what you think!

@achrefBoukhili
Copy link
Author

@YousefED thanks a lot for the feedback and all what you said it makes a sense I think.
So far, let's keep this PR open until we define the final localization mechanism 🙏

@achrefBoukhili achrefBoukhili marked this pull request as draft August 25, 2023 08:39
@YousefED
Copy link
Collaborator

Closing this. It's now possible to change the placeholders, although this still needs to be documented. We'll also add support for i18n soon

@YousefED YousefED closed this Mar 14, 2024
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.

3 participants