Skip to main content
Version: 1.0.0

Document Manager Plugin

DocumentManagerPlugin provides Word/PDF exchange flows for editor content.

Install and import

import {
DocumentManagerPlugin,
setDocumentManagerConfig,
getDocumentManagerConfig,
} from "@editora/plugins";
// or subpath: "@editora/plugins/document-manager"

Usage

setDocumentManagerConfig({
apiUrl: "https://api.example.com",
apiEndpoints: { exportWord: "/documents/export-word" },
useClientSideFallback: true,
});

const plugins = [DocumentManagerPlugin()];

Command Matrix

ActionCommandShortcutToolbar
Import Word documentimportWordNoneImport Word
Export as WordexportWordNoneExport Word
Export as PDFexportPdfNoneExport PDF

Config Options

OptionTypeDefaultNotes
apiUrlstringEmpty/localBase API URL
apiEndpoints.exportWordstringPlugin defaultWord export endpoint
headersRecord<string,string>{}Optional auth/custom headers
useClientSideFallbackbooleantrueFallback when API unavailable

Behavior

  • Resolves active editor before import/export
  • Dispatches editor input updates after import
  • Supports API export and fallback flow

Validation checklist

  • Import updates correct editor instance
  • Export works with and without API availability
  • PDF output preserves core formatting