TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
6.71k stars 462 forks source link

How to change placeholder "Enter text or type '/' for commands" to different text #1251

Open sccsspnk opened 14 hours ago

sccsspnk commented 14 hours ago

https://discord.com/channels/928190961455087667/1305736656317583484 image

how use useCreateBlockNote to change that placeholder?

sccsspnk commented 14 hours ago

I have this:

import { useCreateBlockNote } from "@blocknote/react";
import { BlockNoteView } from "@blocknote/mantine";

import "@blocknote/core/fonts/inter.css";
import "@blocknote/mantine/style.css";

export default function BlockNoteEditor({ setIssue }) {
  const editor = useCreateBlockNote();

  return (
    <BlockNoteView
      //@ts-ignore
      editor={editor}
      sideMenu={false}
      theme="light"
      onChange={() => {
        setIssue(editor.document);
      }}
    />
  );
}