Helios Editor

Word Document Import

Import .docx files directly into the editor with full formatting preservation.

New in v3.4.0

Import Word documents (.docx) with full formatting preservation using mammoth.js!

Features

Preserves text formatting (bold, italic, underline)
Converts Word headings to HTML headings (H1-H6)
Maintains paragraph structure
Imports lists (ordered and unordered)
Converts embedded images to base64 data URLs
Preserves tables with formatting
Handles blockquotes and code blocks
Full error handling and user feedback

How to Use

  1. Click the 📥 "Import from Word" button in the toolbar
  2. Select a .docx file from your computer
  3. The document will be converted and loaded into the editor
  4. Images are automatically embedded as base64 data URLs

Example

<HeliosEditor
  value={content}
  onChange={setContent}
  toolbarOptions={[
    'bold', 'italic', 'underline',
    'headings', 'insertImage',
    'importWord', // Enable Word import
    'exportWord', // Enable Word export
    'exportPDF'   // Enable PDF export
  ]}
/>

Supported Word Features

  • Paragraph styles (Normal, Heading 1-6, Quote, Code)
  • Text formatting (bold, italic, underline, strikethrough)
  • Lists (bullets, numbers)
  • Tables
  • Images (converted to base64)
  • Links
  • Text alignment

File Format Support

Only .docx files (Office 2007 and later) are supported. Legacy .doc files are not supported.