【Tiptap】Tiptap 和 ProseMirror 选哪个?

Great question!

If you're building your own rich-text editor from scratch and wondering whether to base it on Tiptap or directly on ProseMirror, here's a clear, up-to-date (2025) comparison to help you choose the right foundation.

Criteria ProseMirror (raw) Tiptap (built on ProseMirror) Winner for "building your own editor"
Learning curve Steep -- you write everything yourself Much gentler -- 90 % of boilerplate is already solved Tiptap
Flexibility & full control Maximum -- you control every single detail Very high, but you are inside Tiptap's abstraction layer ProseMirror
Development speed Very slow -- you have to implement marks, nodes, commands, keymaps, input rules, paste handling, etc. Extremely fast -- most things "just work" out of the box Tiptap
Bundle size You decide -- can be tiny if you only implement what you need Slightly larger (≈ 60--90 kB gzipped with StarterKit) ProseMirror (if you optimize)
TypeScript support & DX Good, but many types are very generic Excellent first-class TypeScript, auto-completion, docs Tiptap
Ecosystem & extensions Very few ready-made nodes/marks Huge ecosystem (100+ official + community extensions) Tiptap
Collaborative editing (Y.js, etc.) You integrate everything yourself Official Collaboration & CollaborationCursor extensions (very mature in 2025) Tiptap
Track Changes / Versioning / Diffing You have to build 100 % yourself Free community track-changes extension + official Snapshot/SnapshotCompare in Pro Tiptap
Menu / Toolbar / Bubble menu You code everything Built-in commands, useMenu, useBubbleMenu hooks (React/Vue/Svelte) Tiptap
Maintenance burden You maintain everything forever Tiptap team maintains the hard parts (ProseMirror upgrades, bug fixes, security) Tiptap
When you need something very unusual You can do literally anything 99 % of cases are still possible (you can always drop down to ProseMirror transactions) Tie

Real-world conclusions in 2025

99 % of teams that say "I'm building my own editor" should actually start with Tiptap and only drop down to raw ProseMirror transactions when Tiptap truly blocks them.

Choose Tiptap if you want:
  • To ship a production-grade editor in weeks instead of months
  • Collaboration, track changes, comments, tables, mentions, AI commands, etc.
  • Great TypeScript experience and huge extension marketplace
  • To stay up-to-date with ProseMirror fixes without doing the work yourself

Tiptap is basically "ProseMirror + all the hard parts already solved + modern framework integrations".

Choose raw ProseMirror only if at least one of these is true:
  • You need an extremely small bundle (< 30 kB) for a very constrained environment
  • You have highly unconventional content models that none of the existing nodes/marks can represent
  • You cannot accept any abstraction layer at all (very rare)
  • You are building something that is not really a "document" editor (e.g. a code editor, canvas-like node editor, etc.)

Recommendation for almost everyone in 2025

Start with Tiptap v2 (or Tiptap v3 if it's stable by now).

You still have 100 % of ProseMirror's power because everything in Tiptap is just ProseMirror under the hood:

ts 复制代码
// You can always escape the abstraction when needed
editor.view.dispatch(editor.state.tr)
editor.commands.command(({ tr }) => {
  // full ProseMirror Transaction API available
  return true
})

Most companies that originally started with raw ProseMirror in 2020--2023 have now migrated to Tiptap (Notion clones, Laravel Nova replacements, etc.).

Bottom line

For building your own editor in 2025 → Tiptap is the clear winner unless you have a very good reason to suffer with raw ProseMirror. You'll get 5--10× faster development, better maintainability, and you still keep all the power when you really need it.

相关推荐
亮子AI6 天前
【Tiptap】如何使用 ordered list?
数据结构·list·tiptap
亮子AI7 天前
【Tiptap】怎样高效存储内容?
tiptap
亮子AI11 天前
【Tiptap】怎样输入/粘贴 Markdown 到编辑器里?
编辑器·tiptap
亮子AI18 天前
【Tiptap】如何实现增量更新?
tiptap
HBR666_2 个月前
AI编辑器(FIM补全,AI扩写)简介
前端·ai·编辑器·fim·tiptap
HBR666_2 个月前
AI编辑器(二) ---调用模型的fim功能
前端·ai·编辑器·fim·tiptap
不老刘4 个月前
Tiptap(基于 Prosemirror)vs TinyMCE:哪个更适合你的技术栈?
编辑器·tinymce·tiptap·prosemirror