You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
/* You can replace the data-content-type="heading" to "paragraph" or which ever block type you want to change the placeholder of.*/
.my-block-content[data-content-type="heading"] .my-inline-content:before {
content: "Custom Placeholder" !important;
}
I don't think there is another way to change it right now.
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:
consteditor: BlockNoteEditor=useBlockNote({domAttributes: {inlineContent: {"data-placeholder": "This is my new placeholder"}},});
Activity
nacho-villanueva commentedon Nov 3, 2023
A hacky way to change the placeholder is like this:
editor.module.cssI don't think there is another way to change it right now.
nacho-villanueva commentedon Nov 3, 2023
Nevermind. Doesn't work. You need to access the internal css classes.
matthewlipski commentedon Nov 5, 2023
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.
achrefBoukhili commentedon Nov 7, 2023
@gkhngyk there is a draft PR for this #188
but no plan yet to introduce it
hncheung9 commentedon Nov 16, 2023
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!
dogfootruler-kr commentedon Jan 23, 2024
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:
and adding this to my global.css file: