BlockNote DocsFeaturesImport

Importing Content

You can import content into BlockNote from these formats:

  • HTML: The recommended format for migrating from other editors.
  • Markdown: Import Markdown text.
  • DOCX: Open Microsoft Word documents as editable blocks.

Migrating Between Editors

When switching editors, there are several migration strategies to consider:

  • Legacy Editor Approach: Keep both the old and new editors running in parallel. Use the legacy editor for existing content while creating new content in BlockNote.
    • Minimizes disruption to your existing application
    • Can segment usage by content type, organization, or other criteria
  • Hard Cutoff: Migrate all content at once on a specific date
    • Provides a clean break and fresh start
    • May require more upfront preparation
  • Gradual Migration: Convert content progressively, such as when files are opened
    • Smoother transition with less immediate impact
    • Migration period may extend over a longer time

Choose the strategy that best fits your specific needs and constraints.

Importing to BlockNote

For formats without a dedicated importer, convert your source content to HTML first, then use editor.tryParseHTMLToBlocks:

const existingContent = "<p>This is a paragraph.</p>";

const blocks = await editor.tryParseHTMLToBlocks(existingContent);

await storeToDB(blocks);

For details on server-side processing, see our server-side guide.

Migrating from BlockNote

To migrate content out of BlockNote, convert it to HTML using the editor.blocksToHTMLLossy method.

HTML is widely supported and can be easily imported into most other editors.

For details on server-side processing, see our server-side guide.