diff --git a/demos/docxtemplater/README.md b/demos/docxtemplater/README.md index 800280b7a0..92ea00d078 100644 --- a/demos/docxtemplater/README.md +++ b/demos/docxtemplater/README.md @@ -1,14 +1,17 @@ -# superdoc-docxtemplater-demo +# Archived: Docxtemplater integration -A demo of SuperDoc and Docxtemplater working together. - +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. diff --git a/demos/loading-from-json/README.md b/demos/loading-from-json/README.md new file mode 100644 index 0000000000..8d7274dceb --- /dev/null +++ b/demos/loading-from-json/README.md @@ -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. diff --git a/demos/manifest.json b/demos/manifest.json index a691055459..10f9496866 100644 --- a/demos/manifest.json +++ b/demos/manifest.json @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/demos/nodejs/README.md b/demos/nodejs/README.md index c1a73ff77f..77a97212b6 100644 --- a/demos/nodejs/README.md +++ b/demos/nodejs/README.md @@ -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=
I am a paragraph
I AM BOLD!
-``` - -## 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. diff --git a/demos/replace-content/README.md b/demos/replace-content/README.md index 363c66360c..25dec73fd2 100644 --- a/demos/replace-content/README.md +++ b/demos/replace-content/README.md @@ -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 -``` \ No newline at end of file +The source in this directory is kept for archival reference but is not maintained. diff --git a/demos/text-selection/README.md b/demos/text-selection/README.md index f99f7f993d..e1e29a8323 100644 --- a/demos/text-selection/README.md +++ b/demos/text-selection/README.md @@ -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. diff --git a/demos/toolbar/README.md b/demos/toolbar/README.md index 8259750058..012a71ea2a 100644 --- a/demos/toolbar/README.md +++ b/demos/toolbar/README.md @@ -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.