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.76k stars 471 forks source link

Feature/liveblocks v2 #1259

Open YousefED opened 6 days ago

YousefED commented 6 days ago

This PR makes BlockNote compatible with the new, simplified Liveblocks developer experience ❤️

Setting up a Liveblocks enabled editor with collaboration, comments, and mentions now practically becomes a one-liner:

export function Editor() {
  const editor = useCreateBlockNoteWithLiveblocks();

  return (
    <BlockNoteView
      editor={editor}>
      <Threads editor={editor} />
    </BlockNoteView>
  );
}

Changes

TODO:

Future work

UI elements

In contrast to Lexical / Tiptap / Prosemirror, BlockNote is a UI-included library. Currently, we let Liveblocks add UI elements to the editor. This has the disadvantage that the UI elements are in the style of Liveblocks, and have a different look & feel + customization API than default BlockNote UI elements.

We'd like to make UI primitives for collaboration a "first class citizen" of BlockNote that Liveblocks plugs into. If possible, it would be great to collaborate with Liveblocks and re-use parts of their primitives so we can help improve & maintain those together.

Higher level API

Similarly, BlockNote should provide a higher level API for change detection / notifications that Liveblocks now does at the Prosemirror level to add support for mention-notifications. Liveblocks could then plug in to this higher level API.

vercel[bot] commented 6 days ago

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

Name Status Preview Updated (UTC)
blocknote ❌ Failed (Inspect) Nov 20, 2024 4:56am
blocknote-website ❌ Failed (Inspect) Nov 20, 2024 4:56am