Skip to content

馃悰(frontend) adapt to the BlockNote 0.56 editor and exporter APIs - #13

Merged
YousefED merged 2 commits into
devfrom
fix/block-type-select-items
Oct 15, 2026
Merged

YousefED merged 2 commits into
devfrom
fix/block-type-select-items

Conversation

@YousefED

Copy link
Copy Markdown

Purpose

Fix the frontend build. The dev instance deploy of #12 failed in the type check. The BlockNote preview packages at 83153fda2e include BlockNote 0.56, which changes some APIs (TypeCellOS/BlockNote#3059).

Changes

  • BlockNoteToolbar.tsx: blockTypeSelectItems takes the editor, not the dictionary.
  • CodeBlock.tsx: a block's render function is optional now. The code block wrapper throws if BlockNote's code block has none.
  • mappingDocx.tsx: an exporter block mapping can be a function or { withChildren }. The table mapping calls the default mapping in both cases. A table has no child blocks.
  • imagePDF.tsx: the mapping has the plain function type, so the tests can call it directly. Most of the diff is indentation from prettier.

Checks

  • tsc --noEmit in apps/impress: 0 errors (28 before).
  • eslint on the changed files: no errors.
  • vitest for doc-export and custom-blocks: 90 tests pass.

The frontend build fails with the BlockNote preview packages at
83153fda2e. In BlockNote 0.56, blockTypeSelectItems takes the editor,
a block's render function is optional, and an exporter block mapping can
be a function or { withChildren }.

Signed-off-by: yousefed <yousefdardiry@gmail.com>
A new BlockNote version can change its API. The deploy then fails in the
frontend build, so check the types before the pull request.

Signed-off-by: yousefed <yousefdardiry@gmail.com>
@YousefED
YousefED merged commit fae2b43 into dev Oct 15, 2026
23 of 25 checks passed
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.

1 participant