Skip to main content
Uxie’s note editor includes powerful AI capabilities to help you write, edit, and enhance your notes. The AI can improve your writing, fix grammar, summarize content, and generate text based on your prompts.

Overview

The AI completion system is integrated directly into the BlockNote editor, providing instant text generation and editing assistance without leaving your workspace.
AI features require an active internet connection and work best with documents that have AI vectorization enabled.

Quick AI Completion

The fastest way to use AI is with the ++ trigger:
1

Type ++

At the end of any paragraph, type two plus signs: ++
2

AI Continues Writing

The AI automatically continues writing based on your context
3

Review Output

The generated text appears inline as it’s being written

Example Usage

The key findings from the research paper suggest that
++
The AI will analyze the last 500 characters of your text and generate a relevant continuation.

Stopping Generation

Press Esc to stop generation and remove the generated text
// Quick AI completion trigger
onChange={async () => {
  const block = editor.getTextCursorPosition().block;
  const blockText = (await editor.blocksToMarkdownLossy([block])).trim();
  
  const lastTwo = blockText?.slice(-2);
  if (lastTwo === "++" && !isLoading) {
    editor.updateBlock(block, {
      id: block.id,
      content: blockText?.slice(0, -2),
    });
    complete(blockText?.slice(-500) ?? "");
  }
}

AI Block Menu

For more control over AI actions, use the block menu to access specific AI functions.

Accessing the AI Menu

1

Hover Over Block

Hover your mouse to the left of any paragraph to reveal the drag handle
2

Click Drag Handle

Click the six-dot handle icon
3

Select AI Option

Click “AI” from the dropdown menu
This opens the AI popover with pre-built actions and a custom prompt field.

Pre-built AI Actions

Uxie provides several one-click AI actions optimized for common editing tasks:

Improve Writing

Enhances clarity, flow, and professionalism

Fix Spelling & Grammar

Corrects errors and improves sentence structure

Summarize

Creates a concise summary of the selected text

Explain This

Provides a detailed explanation of complex content

Find Action Items

Extracts tasks and action items from text

Using Pre-built Actions

  1. Select a paragraph using the block menu
  2. Click “AI” to open the popover
  3. Choose one of the pre-built actions
  4. Wait for the AI to generate results
  5. Choose how to apply the results
ai/popover.tsx
const AI_COMPLETIONS = [
  {
    category: "Edit or review selection",
    items: [
      "Improve writing",
      "Fix spelling & grammar",
      "Summarise",
      "Explain this",
      "Find action items",
    ],
  },
];

Custom AI Prompts

For more specific requests, use the custom prompt field in the AI popover.

Prompt Examples

  • “Make this more formal”
  • “Rewrite in simple terms”
  • “Add more details about the methodology”
  • “Convert to bullet points”
  • “Write a counter-argument”

Custom Prompt Workflow

1

Open AI Popover

Access via block menu → AI
2

Type Your Request

Enter a custom prompt in the input field
3

Press Enter

Submit your prompt (or click away to cancel)
4

Review Result

The AI generates a response based on your prompt
Be specific in your prompts. Instead of “improve this”, try “make this more academic” or “simplify for a general audience”.

Applying AI Results

Once the AI generates a response, you have two options for integrating it into your notes:
Replaces the original block content with the AI-generated text.Use this when:
  • The AI improved your original text
  • You want to fix grammar/spelling
  • The AI version is better than your draft
ai/popover.tsx
const AI_OPTIONS_AFTER_COMPLETION = [
  {
    title: "Replace selection",
    onClick: () => {
      editor.updateBlock(rect.blockId, {
        content: text,
      });
    },
  },
  {
    title: "Insert below",
    onClick: () => {
      editor.insertBlocks(
        [{ content: text, type: "paragraph" }],
        { id: rect.blockId },
        "after",
      );
    },
  },
];

Iterating on AI Responses

The AI popover supports multiple generations and refinements:

Multiple Generations

  1. After receiving an AI response, type a follow-up prompt
  2. Example: “Make it shorter” or “Add more technical details”
  3. Navigate between different versions using the arrow buttons
  4. Each version is stored until you choose one

Previous

View earlier AI generations

Counter

Shows “X of Y” - current version number

Next

View newer AI generations
Generate multiple variations before choosing one. This helps you compare different approaches and select the best option.

AI Integration with Document Chat

When your PDF has AI vectorization enabled, the AI has access to the entire document context for more relevant responses.

Document-Aware AI

  • Summarize: Creates summaries based on the full document
  • Explain: Provides context from related sections
  • Action Items: Finds tasks across all pages
  • References: Can cite specific sections
Vectorization status is shown with a sparkle icon (✨) on your document card in the library. Vectorization happens automatically for documents under your plan’s page limit.

API Integration

Uxie’s AI features use the OpenAI API for text generation:
// AI completion endpoint
export async function POST(req: Request) {
  const { prompt } = await req.json();
  
  // Streams AI response back to client
  const completion = await openai.chat.completions.create({
    model: "gpt-4",
    messages: [{ role: "user", content: prompt }],
    stream: true,
  });
  
  return new StreamingTextResponse(completion);
}

Best Practices

  1. Be specific: “Make this more formal” vs “improve this”
  2. Provide context: “Explain for beginners” vs “explain”
  3. Set constraints: “In 2 sentences” or “using simple words”
  4. Iterate: Start broad, then refine with follow-up prompts
  • Brainstorming and generating ideas
  • Continuing a thought or argument
  • Drafting initial content quickly
  • Overcoming writer’s block
  • Editing existing content
  • Applying specific transformations
  • Creating summaries or analyses
  • Extracting structured information
Always review AI-generated content for:
  • Factual accuracy
  • Appropriate tone and style
  • Relevance to your needs
  • Potential biases or errors

Keyboard Shortcuts

ActionShortcut
Quick AI completionType ++
Stop generationEsc
Undo AI generationCmd/Ctrl + Z
Open block menuHover + Click drag handle

Troubleshooting

  1. Make sure you’re clicking the drag handle (six dots) on the left
  2. Try clicking directly on a paragraph first to focus it
  3. Refresh the page if the editor is unresponsive
  • Ensure you type ++ at the end of a line
  • Wait a moment after typing
  • Check that you’re not in a code block or special formatting
  • Provide more context in your notes before using AI
  • Use the custom prompt field with specific instructions
  • Try regenerating with a different prompt
  • Check your internet connection
  • The first generation may take longer
  • Try again if you see an error message

Limitations

AI Generation Limits
  • AI features require an active internet connection
  • Generation may fail during high server load
  • Quality depends on the clarity of your input
  • AI should augment, not replace, your own writing
  • Always fact-check AI-generated content

Chat with PDF

Ask questions about your document with AI chat

Note-Taking

Learn more about the BlockNote editor

Document Management

Organize your vectorized documents

Build docs developers (and LLMs) love