AI Assistant Extension
Integrate custom AI generation models to support inline autocompletions, content rewriting, and streaming text chunks directly in your editor views.
Overview
The AI Assistant is powered by the custom AIHighlight TipTap Mark. It highlights text
blocks that are undergoing AI processing/generation, and features a clean callback structure to connect
any backend AI provider (like Google Gemini, OpenAI, or Anthropic).
Connecting your AI Provider
To initialize the AI helper, define a callAI streaming handler and pass it to the createEditor initializer:
Pass the handler inside your editor props configuration:
Autocompletion Triggers
- Space Activation: Pressing the
Spacebar on any empty line inserts a placeholder and triggers the AI generator immediately. - Keyboard Shortcut: Highlight any block of text and press
Mod + Shift + AI(Cmd/Ctrl + Shift + Y depending on config) to apply the AI highlight command. - Selection Actions: Select any block and use the drag handle menu to transform, shorten, or explain text using the AI agent.