Skip to content

docs: Update docs with mobile PR stack changes - #3097

Open
matthewlipski wants to merge 3 commits into
mobile/android-enterfrom
mobile/docs-update
Open

matthewlipski wants to merge 3 commits into
mobile/android-enterfrom
mobile/docs-update

Conversation

@matthewlipski

@matthewlipski matthewlipski commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR updates the docs for all changes in the #2939 PR stack. Created a separate PR to ease review.

Rationale

Ensures we didn't miss documenting any changes from the stack. The addition of the mobile formatting toolbar is the most obvious change, but there were a number of smaller supporting changes which flew under that radar.

Changes

N/A

Impact

N/A

Testing

N/A

Screenshots/Video

N/A

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

N/A

Summary by CodeRabbit

  • Documentation
    • Clarified mobile Formatting Toolbar behavior and setup recommendations for touch devices, including iOS guidance.
    • Documented portal element registration and improved portal target and styling guidance.
    • Added guidance for tracking editor focus with useEditorFocus, onFocusChange, and isFocused(), including editor UI focus.
    • Clarified content API behavior for active styles and selected links.
    • Updated examples and related documentation links for portal elements and mobile toolbars.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1834ace4-ae08-488d-9f35-ed1576c983c6

📥 Commits

Reviewing files that changed from the base of the PR and between 2bb6a35 and 0305e53.

📒 Files selected for processing (15)
  • docs/content/docs/getting-started/index.mdx
  • docs/content/docs/getting-started/vanilla-js.mdx
  • docs/content/docs/react/components/formatting-toolbar.mdx
  • docs/content/docs/react/components/index.mdx
  • docs/content/docs/react/overview.mdx
  • docs/content/docs/react/styling-theming/overriding-css.mdx
  • docs/content/docs/reference/editor/events.mdx
  • docs/content/docs/reference/editor/manipulating-content.mdx
  • docs/content/docs/reference/editor/overview.mdx
  • examples/03-ui-components/05-side-menu-drag-handle-items/src/App.tsx
  • examples/03-ui-components/20-portal-elements/README.md
  • examples/05-interoperability/11-converting-blocks-to-pdf-react-pdf-deprecated/index.html
  • packages/core/src/editor/BlockNoteEditor.ts
  • packages/core/src/editor/managers/EventManager.ts
  • playground/src/examples.gen.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The pull request updates BlockNote documentation and examples. It documents focus APIs, portal registration, mobile Formatting Toolbar behavior, viewport configuration, portal targets, styling, and content-query results. No functional implementation changes are described.

Editor UI documentation

Layer / File(s) Summary
Focus API and portal registration
docs/content/docs/getting-started/vanilla-js.mdx, docs/content/docs/react/overview.mdx, docs/content/docs/reference/editor/events.mdx, docs/content/docs/reference/editor/overview.mdx, packages/core/src/editor/BlockNoteEditor.ts, packages/core/src/editor/managers/EventManager.ts
The documentation and JSDoc describe useEditorFocus, onFocusChange, isFocused, editor UI focus, focus settling, and registration of portal elements.
Mobile toolbar and portal guidance
docs/content/docs/getting-started/index.mdx, docs/content/docs/react/components/formatting-toolbar.mdx, docs/content/docs/react/components/index.mdx, docs/content/docs/react/styling-theming/overriding-css.mdx, examples/03-ui-components/20-portal-elements/README.md, examples/05-interoperability/11-converting-blocks-to-pdf-react-pdf-deprecated/index.html, playground/src/examples.gen.tsx
The documentation and examples describe touch-device toolbar placement, viewport configuration, scroll-container guidance, portal targets, portalled UI styling, and related examples.
Reference and example clarifications
docs/content/docs/reference/editor/manipulating-content.mdx, examples/03-ui-components/05-side-menu-drag-handle-items/src/App.tsx
The reference documentation clarifies content-query results, and an example comment is reworded.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: yousefed

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies a documentation update related to the PR stack. It is broad but accurately describes the main change.
Description check ✅ Passed The description includes all required template sections and explains the purpose of the documentation update. The Changes and Testing sections use “N/A” despite the documented changes, but the descrip…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads the toolbar guide,
With focus hops from side to side.
Portals bloom where menus go,
Mobile tools rise soft and slow.
Clear docs now mark each trail,
And helpful links complete the tale.

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blocknote Ready Ready Preview Sep 18, 2026 6:43pm UTC
blocknote-website Ready Ready Preview Sep 18, 2026 6:43pm UTC

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Sep 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@3097

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@3097

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@3097

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@3097

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@3097

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@3097

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@3097

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@3097

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@3097

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@3097

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@3097

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@3097

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@3097

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@3097

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@3097

@blocknote/xl-typst-exporter

npm i https://pkg.pr.new/@blocknote/xl-typst-exporter@3097

commit: 0305e53

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://TypeCellOS.github.io/BlockNote/pr-preview/pr-3097/

Built to branch gh-pages at 2026-09-21 12:43 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@YousefED YousefED left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, 1 comment

Comment thread docs/content/docs/react/components/formatting-toolbar.mdx Outdated

@YousefED YousefED left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some generic feedback on the docs @ https://blocknote-website-git-mobile-docs-update-typecell.vercel.app/docs/

https://blocknote-website-git-mobile-docs-update-typecell.vercel.app/docs/getting-started#mobile-compatibility

  • The Android meta workaround is now listed on getting started, but the iOS scroll-container on the mobile formatting toolbar area. wdyt, might be better to make consistent?
  • instead of terms like "it's good practice", I'd say "we recommend"

https://blocknote-website-git-mobile-docs-update-typecell.vercel.app/docs/react/components/formatting-toolbar#mobile-formatting-toolbar

  • The warning goes into explaining technicalities. It's pinned to the visual viewport with position: fixed, so multiple containers would overlap each other. Wrap all your scrollable page content in one. I'm not sure this is useful. Less is more?

@matthewlipski

Copy link
Copy Markdown
Collaborator Author
  • The Android meta workaround is now listed on getting started, but the iOS scroll-container on the mobile formatting toolbar area. wdyt, might be better to make consistent?

I would say the current structure is better tbh. Setting the meta tag is non-invasive, easy, and has no real down sides so it's applicable to everyone and hence makes sense to put in "Getting Started". The iOS scroll container fix is however more involved and should be a decision made by the developer, therefore won't be applicable to everyone in a way that a "Getting Started" section imo should be.

  • instead of terms like "it's good practice", I'd say "we recommend"

Sure, will fix

  • The warning goes into explaining technicalities. It's pinned to the visual viewport with position: fixed, so multiple containers would overlap each other. Wrap all your scrollable page content in one. I'm not sure this is useful. Less is more?

Think I agree, will remove the technical explanation

Getting Started now states what a reader gets for free, then the two
things their app should do, each with the reason it matters: the viewport
meta tag lays the page out above the keyboard, and on iOS, which ignores
that tag, the scroll container layout does the same job.

On the Formatting Toolbar page:

- Browser limitations no longer opens by telling readers to add the meta
  tag, which the Getting Started guide has them do one paragraph before
  following the link here. It now states the precondition instead.
- The scroll container's placement is a recommendation ("directly inside
  <body>") rather than a requirement to be a direct child of <body>,
  which is not true (position: fixed resolves against the viewport at any
  depth) and which no app rendering into a framework root could meet.
- Restored that the mobile toolbar has the same items as the regular one
  and is enabled by default, and dropped the sentence announcing that a
  workaround exists right before the paragraph giving it.

The vanilla guide says what breaks without registerPortalElement instead
of pointing at isWithinEditor, which the docs never introduce.
@YousefED

Copy link
Copy Markdown
Collaborator

I would say the current structure is better tbh. Setting the meta tag is non-invasive, easy, and has no real down sides so it's applicable to everyone and hence makes sense to put in "Getting Started". The iOS scroll container fix is however more involved and should be a decision made by the developer, therefore won't be applicable to everyone in a way that a "Getting Started" section imo should be.

Agree, but the way it was setup there wasn't any incentive for developers to click through to the mobile experience to get the best iOS user experience. Addressed this in the last commit

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