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
Default placeholder changing problem #403
Comments
A hacky way to change the placeholder is like this:
I don't think there is another way to change it right now. |
Nevermind. Doesn't work. You need to access the internal css classes. |
Yep this is a problem indeed, planning to get rid of CSS modules so that external style sheets can have access to those classes which should at least make it possible to change them. |
I would like to fix my placeholder too. When using editor with short width, the default placeholder take 2 rows and will block the content of the next noteblock. In the last noteblock, placeholder would extend out of the editor area. Although it will not affect usability, any customisation would be appreciated! |
I managed to change the default placeholder by adding a data attribute to the inline-content then setting the content of the before to the value of this data attribute like this: const editor: BlockNoteEditor = useBlockNote({
domAttributes: {
inlineContent: {
"data-placeholder": "This is my new placeholder"
}
},
}); and adding this to my global.css file: .bn-editor .bn-block-content[data-content-type=paragraph].bn-is-empty .bn-inline-content::before {
content: attr(data-placeholder);
} |
Hello,
I don't use the slash menu, but in the placeholder of each block it says
Enter text or type '/' for commands.
I couldn't change this placeholder no matter what I did.Is there any way to change it?
The text was updated successfully, but these errors were encountered: