TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.

Home Page:https://www.blocknotejs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small issue: List showing nulls, not numbers, on render

james-pratama opened this issue · comments

On render, my lists are showing null instead of numbers. The numbers only show once I click the editor.

Screenshot 2024-04-03 at 8 17 11 AM

Tried adding ref to BlockNoteView to auto focus editor but does not seem to work.

Is there a list somewhere of all the properties taken by BlockNoteView?

@james-pratama could you provide steps or a sandbox to reproduce this?

I have the same problem.

It can also be found at the following URL example.

https://www.blocknotejs.org/examples/basic/all-blocks

( Line of Numbered List Item)

If you go back and forth between example > basic > (product line-up),
number list item becomes null when out of focus

スクリーンショット 2024-04-12 065744

We also have this issue, and any help would be greatly appreciated.
https://blog.opengtm.ai/how-strategic-territory-planning-can-boost-sales-performance

Screenshot 2024-05-03 at 12 05 01 AM

We have a same issue as well.

I have the same issue, i fix it temporarily using this trick:

useEffect(() => {
    let timeout: NodeJS.Timeout;
    if (editor) {
      timeout = setTimeout(() => {
        const firstBlock = editor.document[0];
        if (firstBlock) editor.updateBlock(firstBlock, { type: firstBlock.type });
      }, 100);
    }

    return () => {
      clearTimeout(timeout);
    };
  }, [editor]);

basically just update a block and it will not show as null after render

I've encountered something similar as well, will try implementing temporary fix used by @Dadangdut33.
Screenshot 2024-06-02 at 9 46 46 AM

Hi, haven't seen this issue before - if anyone can post steps to reproduce it that would be great!

@matthewlipski If you have multiple tabs using BlockNoteView, the numbered list will become null when you switch tabs. Additionally, when the BlockNoteView is in a non-editable state, the numbered list will also become null when you reload the page.

Screen.Recording.2024-06-13.at.09.13.13.mov

if anyone can post steps to reproduce it that would be great!

Hope it helps, so basically:

  1. Intialize blocknote with data
  2. Render blocknote
  3. null will be shown for data that is using list until you click on the editor (or do an edit programmatically)

Thanks! Helps a lot, we'll look into it next time we do a bugfix release