Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

## ✨ Features

- **πŸ“ Microsoft Word compatible**: View and edit DOCX documents (and view PDFs too) with great import/export, advanced formatting, comments, and tracked changes
- **πŸ“ Microsoft Word compatible**: View and edit DOCX documents with great import/export, advanced formatting, comments, and tracked changes
- **πŸ› οΈ Easy to integrate**: Open source, can be self-hosted, seamlessly integrates with React, Vue, vanilla JavaScript, and more
- **πŸ‘₯ Real-time collaboration**: Features multiplayer editing, live updates, commenting, sharing, and revision history
- **πŸ“ Extensible architecture**: Modular design makes it easy to extend, brand, and customize
Expand All @@ -47,23 +47,38 @@
npm install @harbour-enterprises/superdoc
```

Or install with CDN

```html
<link rel="stylesheet" href="https://unpkg.com/@harbour-enterprises/superdoc/dist/style.css">
<script type="module" src="https://unpkg.com/@harbour-enterprises/superdoc/dist/superdoc.umd.js"></script>
```

### Basic usage

```javascript
import '@harbour-enterprises/superdoc/style.css';
import { SuperDoc } from '@harbour-enterprises/superdoc';

const url = '...'; // The URL to your document
// For CDN use - `SuperDocLibrary.SuperDoc`
const superdoc = new SuperDoc({
selector: '#superdoc',
documents: [{
id: 'my-doc-id',
type: 'docx',
url // *JS file object or file URL
}]
toolbar: '#superdoc-toolbar',
document: '/sample.docx', // URL, File or document config
documentMode: 'editing',
pagination: true,
rulers: true,
onReady: (event) => {
console.log('SuperDoc is ready', event);
},
onEditorCreate: (event) => {
console.log('Editor is created', event);
},
});
```

For a list of all available properties and events, see the documentation or refer to [SuperDoc.js](packages/superdoc/src/core/SuperDoc.js)

## πŸ“– Documentation

Visit our <a href="https://docs.superdoc.dev" target="_blank">documentation site</a> and <a href="https://github.com/Harbour-Enterprises/SuperDoc/tree/main/examples" target="_blank">code examples</a>. Key topics include:
Expand Down
Loading