Overview
The Document Manager plugin enables users to organize, manage, and switch between multiple documents within a single editor instance. Create new documents, organize them in folders, and maintain separate editing spaces for different projects.
Features
- â Multiple document support
- â Document tabs/sidebar
- â Folder organization
- â Document templates
- â Rename/delete documents
- â Document properties
- â Import/export
- â Document search
Installation
npm install @editora/plugin-document-manager
Basic Usage
import Editora from '@editora/core';
import DocumentManagerPlugin from '@editora/plugin-document-manager';
const editor = new Editora('#editor');
editor.use(DocumentManagerPlugin);
// Create new document
editor.execCommand('newDocument', { name: 'My Document' });
Document Management
Organize your documents:
- Create: New document or from template
- Switch: Click tab or sidebar entry to switch documents
- Organize: Create folders and move documents
- Export: Save individual or multiple documents
Configuration Options
| Option | Type | Description |
|---|---|---|
| showSidebar | boolean | Show document sidebar (default: true) |
| maxDocuments | number | Maximum open documents (default: unlimited) |
| autoSave | boolean | Auto-save documents (default: true) |
API Methods
- newDocument(options): Create new document
- openDocument(id): Open document by ID
- closeDocument(id): Close document
- listDocuments(): Get all documents
- renameDocument(id, name): Rename document
- deleteDocument(id): Delete document