Skip to content

docs(guides): add guide for integrating Tiptap into a mobile app - #877

Open
ozdemircibaris wants to merge 7 commits into
mainfrom
docs/mobile-integration-guide
Open

docs(guides): add guide for integrating Tiptap into a mobile app#877
ozdemircibaris wants to merge 7 commits into
mainfrom
docs/mobile-integration-guide

Conversation

@ozdemircibaris

@ozdemircibaris ozdemircibaris commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Adds a guide for running Tiptap in a mobile app: render the editor in a webview and drive it from native code over a small JSON protocol (commands, events, and host requests) with Flutter, iOS, and Android transports.

Links the tiptap-mobile-bridge reference repo for the full runnable implementation, and wires the page into the guides sidebar and index.

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tiptap-docs Ready Ready Preview, Comment Jul 8, 2026 11:17am

Request Review

@arnaugomez arnaugomez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested improvements:

  • Make it clearer that the protocol supports any platform (not just ios and flutter). We only provide examples of iOS and Flutter but it could also support react native and other platforms
  • Security section is correct but incomplete. Add: "Also validate every incoming bridge message before executing it, and only load trusted, bundled editor HTML into the WebView. Avoid exposing broad native APIs through the bridge; keep host requests explicit and allow-listed."

Minor wording / consistency comments

  • In the guide index card, “How to integrate Tiptap into a mobile app?” is grammatically awkward as a title. Prefer “How to integrate Tiptap into a mobile app” or “Integrate Tiptap into a mobile app” .
  • “run a host end to end” would read better as “run a host app end-to-end” .
  • “The rest of this guide builds the same thing from scratch” might overpromise, since many snippets are partial and the complete implementation is delegated to the reference repo . Prefer “walks through the same architecture”.
  • “with the editor staying a normal Tiptap instance” is understandable but slightly awkward. Prefer “while the editor remains a normal Tiptap instance” .
  • The sidebar title is “Mobile integration” , while the page title is “Integrate Tiptap into a mobile app” . That is probably fine, but “Mobile app integration” may be clearer and more consistent with the page.
Before wiring your own app, clone the reference repository and run a host end to end, the fastest way to see the protocol working:

```bash
git clone https://github.com/ueberdosis/tiptap-mobile-bridge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Repo is private so we have to publish it before we merge this PR.

Comment thread src/content/guides/mobile-integration.mdx Outdated
Comment thread src/content/guides/mobile-integration.mdx Outdated
Comment thread src/content/guides/mobile-integration.mdx Outdated

The webview renders the editor; your native code renders the surrounding UI (toolbars, menus) and talks to the editor over JSON messages in three directions:

- **Commands** flow from your app to the editor. Each carries an `id`, and the editor answers with one response that echoes it, which is how you correlate an async result like "give me the document".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This introduces a bit of a confusion between editor commands and the commands of your protocol. Both concepts are different, but they have the same name.

Comment thread src/content/guides/mobile-integration.mdx Outdated

## Drive a native toolbar

A native toolbar needs to know which buttons are active (the selection is bold) and which are available (you can't make a list item bold). Compute that state when the selection changes and send it as a `selectionChanged` event, but only for the commands you actually render, never by looping over every command (see the warning below):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The example "you can't make a list item bold" is incorrect, you can make the content inside a list item bold.

Suggested replacement: whether a heading can be toggled at the current selection

Comment thread src/content/guides/mobile-integration.mdx Outdated
Comment thread src/content/guides/mobile-integration.mdx Outdated

@arnaugomez arnaugomez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to add a section for community initiatives to the guide? Mentioning 10Tap and tiptap-flutter.

Or do we mention them on social media and Discord only?

@ozdemircibaris

Copy link
Copy Markdown
Contributor Author

Do we want to add a section for community initiatives to the guide? Mentioning 10Tap and tiptap-flutter.

Or do we mention them on social media and Discord only?

I added a Community projects section to the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants