Resources
Migration Guide
Migrating from Tiptap, Slate, or older Arkpad versions.
From Tiptap
Key Differences
| Concept | Tiptap | Arkpad |
|---|---|---|
| Editor class | new Editor({...}) | new ArkpadEditor({...}) |
| Command API | editor.chain().toggleBold().run() | editor.runCommand('toggleBold') or editor.commands.toggleBold() |
| React hook | useEditor | useArkpadEditor |
| Content component | EditorContent | ArkpadEditorContent |
Extension create() | Top-level import | Extension.create() from core |
Command Migration
- editor.chain().toggleBold().focus().run()
+ editor.commands.toggleBold()
+ editor.focus()Extensions are structured similarly but use Arkpad's Extension Factory pattern:
// Tiptap
import { Extension } from "@tiptap/core";
// Arkpad
import { Extension } from "@arkpad/core";From Old Arkpad API
- import { createArkpadEditor } from '@arkpad/core'
+ import { ArkpadEditor } from '@arkpad/core'
- const editor = createArkpadEditor({ ... })
+ const editor = new ArkpadEditor({ ... })React Component Migration
- import { ArkpadEditorComponent } from '@arkpad/react'
+ import { useArkpadEditor, ArkpadEditorContent } from '@arkpad/react'
- <ArkpadEditorComponent content="..." />
+ const editor = useArkpadEditor({ content: "..." })
+ <ArkpadEditorContent editor={editor} />From Slate
Architecture Comparison
| Aspect | Slate | Arkpad |
|---|---|---|
| Schema | Custom | ProseMirror-based, strict |
| Extensions | Plugins | Class-based Extension Factory |
| Commands | Custom functions | Named commands with proxy |
| React | Built-in hooks | Framework-agnostic core + React package |
Key Migration Steps
- Replace Slate
<Editable>with Arkpad's<ArkpadEditorContent> - Convert custom Slate plugins to Arkpad extensions using
Extension.create() - Replace
TransformsAPI with Arkpad'seditor.runCommand()pattern
From Draft.js / Quill
| Feature | Draft.js / Quill | Arkpad |
|---|---|---|
| Architecture | Monolithic | Modular, headless |
| Custom blocks | Complex | Simple Extension.create() API |
| TypeScript | Partial | First-class |
| Framework | React-only | Any framework |
The main shift is from a monolithic editor to Arkpad's modular extension system. Start with the Quick Start guide and refer to the Extension Factory for custom features.