SuperEditor is the core DOCX editing engine that powers SuperDoc. Use it directly when you need fine-grained control.

When to use SuperEditor vs SuperDoc

Use SuperDoc (recommended):
  • Standard DOCX editing needs
  • Built-in UI and modules
  • Collaboration and comments
  • Quick integration
Use SuperEditor directly:
  • Custom UI implementation
  • Framework-specific integrations
  • Headless/server-side processing
  • Custom extension development

Creating an instance

import { SuperEditor } from '@harbour-enterprises/superdoc/super-editor';

const editor = new SuperEditor({
  selector: '#editor',
  fileSource: docxFile,
  documentId: 'doc-123',
  options: {
    user: { name: 'John', email: 'john@co.com' },
    documentMode: 'editing'
  }
});

Direct ProseMirror access

SuperEditor gives you full ProseMirror access:
// Access ProseMirror directly
editor.view        // EditorView
editor.state       // EditorState  
editor.schema      // Schema
editor.commands    // All commands

// Do anything ProseMirror can do
editor.state.doc.forEach(node => {
  console.log(node.type.name);
});

API structure