Skip to content

feat: CSS variables for placeholders - #516

Closed
matthewlipski wants to merge 1 commit into
mainfrom
placeholder-changing-basic
Closed

feat: CSS variables for placeholders#516
matthewlipski wants to merge 1 commit into
mainfrom
placeholder-changing-basic

Conversation

@matthewlipski

Copy link
Copy Markdown
Collaborator

This PR allows for setting CSS variables to customize the default placeholders. It contains only basic functionality as it's meant as a temporary solution before we fix performance issues in #503:

  • Can change default placeholder which appears in the block which contains the text cursor
  • Can change placeholder which is appears after pressing the add block button
  • Can change placeholders for default heading and list item blocks, which are always visible and overwrite the default placeholder
  • No support for custom blocks or more advanced filtering based on block

Default placeholders:

.bn-container {
  --bn-default-placeholder: "Enter text or type '/' for commands";
  --bn-filter-placeholder: "Type to filter";
  --bn-heading-placeholder: "Heading";
  --bn-list-placeholder: "List";
}

@vercel

vercel Bot commented Jan 13, 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 Jan 13, 2024 0:34am
blocknote-website ✅ Ready (Inspect) Visit Preview Jan 13, 2024 0:34am

@YousefED

YousefED commented Mar 4, 2024

Copy link
Copy Markdown
Collaborator

will be supserseded by #503

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

2 participants