Skip to content
Merged
Show file tree
Hide file tree
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
23 changes: 13 additions & 10 deletions demos/docxtemplater/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# superdoc-docxtemplater-demo
# Archived: Docxtemplater integration

A demo of SuperDoc and Docxtemplater working together.
![Demo gif](./demo.gif)
This demo is no longer recommended and has been removed from the demo gallery.

[Superdoc homepage](https://superdoc.dev/) |
[Docxtemplater homepage](https://docxtemplater.com/)
## Why archived

# to run
run the following commands in this directory:
- `npm install`
- `npm run dev`
This was a third-party-library integration demo (SuperDoc + Docxtemplater) that pulled a heavy dependency stack (FontAwesome, jQuery, etc.) and was not actively maintained as a supported integration story.

Boilerplate code generated by `create-vue`
## Use instead

For template merge workflows on top of SuperDoc, prefer:

- [Document API](https://docs.superdoc.dev/document-api/overview) (`editor.doc.text.rewrite`, `editor.doc.insert`, `editor.doc.contentControls.*`) for programmatic content replacement.
- [Template Builder](https://docs.superdoc.dev/solutions/template-builder/introduction) for an authoring component on top of content controls.
- [`demos/contract-templates`](../contract-templates) for the worked content-controls workflow demo.

The source in this directory is kept for archival reference but is not maintained.
14 changes: 14 additions & 0 deletions demos/loading-from-json/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Archived: loading editor JSON

This demo is no longer recommended and has been removed from the demo gallery.

## Why archived

There is no public `editor.loadJSON()` API. The supported path for providing initial document state from JSON is the `jsonOverride` option passed to `SuperDoc` at construction time. This demo predates that surface and never had a README.

## Use instead

- The `jsonOverride` option on `SuperDoc`, set at init time. Documented under the SuperDoc configuration reference.
- For inserting JSON content into an existing document, `editor.doc.insert` with the structural insert input shape.

The source in this directory is kept for archival reference but is not maintained.
84 changes: 0 additions & 84 deletions demos/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,6 @@
"stackblitz": true,
"review": "Candidate for an import/export or Document Engine example."
},
{
"id": "docxtemplater",
"title": "Docxtemplater integration",
"description": "Use SuperDoc with Docxtemplater.",
"category": "Integrations",
"sourceRepo": "superdoc-dev/superdoc",
"sourcePath": "demos/docxtemplater",
"docs": null,
"thumbnail": "demos/docxtemplater/demo-thumbnail.png",
"liveUrl": null,
"homepage": false,
"stackblitz": true,
"review": "Decide whether this belongs in monorepo demos or live integrations."
},
{
"id": "fields-source",
"title": "Fields source demo",
Expand Down Expand Up @@ -198,20 +184,6 @@
"stackblitz": true,
"review": "Move to Advanced unless document sections become a primary docs surface."
},
{
"id": "text-selection",
"title": "Programmatic text selection",
"description": "Programmatic selection using low-level editor state.",
"category": "Advanced",
"sourceRepo": "superdoc-dev/superdoc",
"sourcePath": "demos/text-selection",
"docs": "https://docs.superdoc.dev/editor/custom-ui/selection-and-viewport",
"thumbnail": "demos/text-selection/demo-thumbnail.png",
"liveUrl": null,
"homepage": false,
"stackblitz": true,
"review": "Review against the Custom UI selection and viewport APIs."
},
{
"id": "html-editor",
"title": "HTML editor",
Expand All @@ -226,20 +198,6 @@
"stackblitz": true,
"review": "Move to Advanced or archive as a legacy compatibility shim."
},
{
"id": "loading-from-json",
"title": "Load from JSON",
"description": "Load editor JSON into SuperDoc.",
"category": "Advanced",
"sourceRepo": "superdoc-dev/superdoc",
"sourcePath": "demos/loading-from-json",
"docs": null,
"thumbnail": "demos/loading-from-json/demo-thumbnail.png",
"liveUrl": null,
"homepage": false,
"stackblitz": true,
"review": "Keep only if JSON import remains a supported public path."
},
{
"id": "nextjs-ssr",
"title": "Next.js SSR",
Expand All @@ -254,48 +212,6 @@
"stackblitz": false,
"review": "Compare with examples/getting-started/nextjs before keeping."
},
{
"id": "nodejs",
"title": "Node.js headless server",
"description": "Headless Node server using legacy Editor commands.",
"category": "Document Engine",
"sourceRepo": "superdoc-dev/superdoc",
"sourcePath": "demos/nodejs",
"docs": "https://docs.superdoc.dev/document-engine/overview",
"thumbnail": "demos/nodejs/demo-thumbnail.png",
"liveUrl": null,
"homepage": false,
"stackblitz": false,
"review": "Rewrite or replace with Document Engine SDK/CLI examples."
},
{
"id": "replace-content",
"title": "Replace content",
"description": "Replace document or selection content with HTML or JSON.",
"category": "Document Engine",
"sourceRepo": "superdoc-dev/superdoc",
"sourcePath": "demos/replace-content",
"docs": "https://docs.superdoc.dev/document-api/common-workflows",
"thumbnail": "demos/replace-content/demo-thumbnail.png",
"liveUrl": null,
"homepage": false,
"stackblitz": true,
"review": "Update to Document API before moving."
},
{
"id": "toolbar",
"title": "Toolbar customization",
"description": "Built-in toolbar custom button plus custom node authoring.",
"category": "Advanced",
"sourceRepo": "superdoc-dev/superdoc",
"sourcePath": "demos/toolbar",
"docs": "https://docs.superdoc.dev/editor/built-in-ui/toolbar",
"thumbnail": "demos/toolbar/demo-thumbnail.png",
"liveUrl": null,
"homepage": false,
"stackblitz": true,
"review": "Split toolbar configuration from custom node authoring."
},
{
"id": "shim-react",
"title": "React starter shim",
Expand Down
33 changes: 9 additions & 24 deletions demos/nodejs/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
# SuperDoc: Node.js Example
# Archived: headless Node.js Editor

A headless Node.js example using SuperDoc's Editor class with Express.
This demo is no longer recommended and has been removed from the demo gallery.

> Requires Node >= 20. Earlier versions are missing the `File` object. If you must use Node < 20, see the file polyfill in this example.
## Why archived

## Quick start
This demo wrapped SuperDoc's `Editor` class directly behind an Express server, which predates the supported server-side path. Headless Document API operations now run through the Node SDK and the CLI, which keep the same `editor.doc.*` surface as the browser editor.

```bash
npm install && npm run dev
```
## Use instead

Runs an Express server at `http://localhost:3000` with a single root endpoint that returns a `.docx` file.
- [`examples/editor/collaboration/backends/node-sdk`](../../examples/editor/collaboration/backends/node-sdk) for a headless Node client that mutates documents through the Document API.
- [`examples/document-engine/ai-redlining`](../../examples/document-engine/ai-redlining) for a server-side AI-driven flow with the same engine.
- [Document Engine SDKs](https://docs.superdoc.dev/document-engine/sdks) for the full surface.

## Usage

```
# Returns the unchanged .docx template
http://localhost:3000

# Insert text
http://localhost:3000?text=hello world!

# Insert HTML
http://localhost:3000?html=<p>I am a paragraph</p><p><strong>I AM BOLD!</strong></p>
```

## Additional docs

See the [SuperDoc docs](https://docs.superdoc.dev/advanced/supereditor/methods) for all available editor commands and hooks.
The source in this directory is kept for archival reference but is not maintained.
29 changes: 9 additions & 20 deletions demos/replace-content/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
# Replace Content Example
# Archived: replace content

A React example demonstrating how to replace document content with HTML or JSON using SuperDoc.
This demo is no longer recommended and has been removed from the demo gallery.

## Features
## Why archived

- Load DOCX documents
- Replace entire document or selection with custom content
- Switch between HTML and JSON input formats
- Side panel with content replacement controls
This demo replaced document content via the pre-Document-API editor commands. The supported path is the `editor.doc.*` Document API, which gives you typed inputs, dry-run previews, and the same operation IDs across browser, Node SDK, and CLI.

## Usage
## Use instead

1. Load a document using "Load Document" button
2. Open the side panel using the tab on the right
3. Choose replacement scope (Document or Selection)
4. Select content type (HTML or JSON)
5. Enter your content in the textarea
6. Click "Replace content" to apply changes
- `editor.doc.text.rewrite`, `editor.doc.insert`, `editor.doc.delete`, `editor.doc.replace` for content mutations.
- [`examples/document-api/content-controls/tagged-inline-text`](../../examples/document-api/content-controls/tagged-inline-text) and [`examples/document-api/metadata-anchors`](../../examples/document-api/metadata-anchors) for primitive-led Document API examples.
- [Document API overview](https://docs.superdoc.dev/document-api/overview).

## Running

```bash
npm install
npm run dev
```
The source in this directory is kept for archival reference but is not maintained.
17 changes: 13 additions & 4 deletions demos/text-selection/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# SuperDoc - Programmatic Text Selection Example
# Archived: programmatic text selection

This React-based example shows how SuperDoc can select text in a document relative to the cursor's position.
This demo is no longer recommended and has been removed from the demo gallery.

- [Based on character count](https://github.com/superdoc-dev/superdoc/blob/main/demos/text-selection/src/App.jsx)
- [Or, just grab the whole line](https://github.com/superdoc-dev/superdoc/blob/main/demos/text-selection/src/App.jsx)
## Why archived

This demo reached into ProseMirror's `TextSelection` and `activeEditor.view` directly, which predates the supported Custom UI selection surface. The recommended path is the `ui.selection.*` and `ui.viewport.*` handles, which give you capture, restore, anchor rects, and viewport-relative geometry without reaching into editor internals.

## Use instead

- [`examples/editor/custom-ui/selection-capture`](../../examples/editor/custom-ui/selection-capture) for the smallest selection-capture/restore lesson.
- [Custom UI: selection and viewport](https://docs.superdoc.dev/editor/custom-ui/selection-and-viewport) for the conceptual guide.
- `ui.selection.capture`, `ui.selection.restore`, `ui.selection.getAnchorRect`, `ui.viewport.scrollIntoView` for the supported APIs.

The source in this directory is kept for archival reference but is not maintained.
15 changes: 9 additions & 6 deletions demos/toolbar/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# SuperDoc: Customizing the Toolbar
# Archived: customizing the toolbar

An example of how to add a custom button to the SuperDoc toolbar. This custom button inserts a random cat GIF into the document.
This demo is no longer recommended and has been removed from the demo gallery.

[We define the custom button in the `modules.toolbar.customButtons` option](https://github.com/superdoc-dev/superdoc/blob/main/demos/toolbar/src/main.js)
## Why archived

The button's action is to insert a custom `catNode`. [The custom node and its Prosemirror click-handler plugin are defined in the same file](https://github.com/superdoc-dev/superdoc/blob/main/demos/toolbar/src/main.js).
This demo bundled two unrelated lessons into one workspace: configuring a custom toolbar button, and authoring a custom ProseMirror node (a "cat GIF" node). Each lesson is now covered cleanly by its own focused example.

It is also possible to fully replace the toolbar with your own: [Headless Toolbar](https://docs.superdoc.dev/editor/built-in-ui/toolbar/overview#learn-more)
## Use instead

More customization options here: https://docs.superdoc.dev/editor/built-in-ui/toolbar/overview
- [`examples/editor/custom-ui/configurable-toolbar`](../../examples/editor/custom-ui/configurable-toolbar) for the toolbar configuration lesson.
- [`examples/advanced/extensions/custom-node`](../../examples/advanced/extensions/custom-node) for the custom-node authoring lesson.

The source in this directory is kept for archival reference but is not maintained.
Loading