From 24ee45489f81a559c2744ab8f3e5e3a5a732eca0 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Thu, 5 Feb 2026 20:33:32 -0300 Subject: [PATCH 01/45] docs: mark internal APIs + update Editor examples to Editor.open() --- apps/docs/core/superdoc/properties.mdx | 2 +- apps/docs/core/supereditor/configuration.mdx | 181 +++------- apps/docs/core/supereditor/overview.mdx | 44 +-- apps/docs/extensions/document-section.mdx | 10 +- apps/docs/extensions/field-annotation.mdx | 3 +- apps/docs/extensions/track-changes.mdx | 6 +- apps/docs/getting-started/ai-agents.mdx | 21 +- apps/docs/modules/toolbar.mdx | 2 +- packages/super-editor/src/index.js | 11 +- packages/superdoc/src/index.js | 1 + scripts/docs/scan-coverage.ts | 344 +++++++++++++++++++ 11 files changed, 433 insertions(+), 192 deletions(-) create mode 100644 scripts/docs/scan-coverage.ts diff --git a/apps/docs/core/superdoc/properties.mdx b/apps/docs/core/superdoc/properties.mdx index 914412e38e..f505debcf7 100644 --- a/apps/docs/core/superdoc/properties.mdx +++ b/apps/docs/core/superdoc/properties.mdx @@ -122,7 +122,7 @@ superdoc.users.forEach(user => { ### Toolbar - + Toolbar instance if configured ```javascript diff --git a/apps/docs/core/supereditor/configuration.mdx b/apps/docs/core/supereditor/configuration.mdx index 874ae10e2b..8c7621ee64 100644 --- a/apps/docs/core/supereditor/configuration.mdx +++ b/apps/docs/core/supereditor/configuration.mdx @@ -9,73 +9,60 @@ SuperEditor configuration gives you low-level control over the DOCX engine. ```javascript import "superdoc/style.css"; -import { Editor, getStarterExtensions } from "superdoc/super-editor"; - -// Parse DOCX file first -const [content, media, mediaFiles, fonts] = await Editor.loadXmlData(docxFile); +import { Editor } from "superdoc/super-editor"; -// Create editor -const editor = new Editor({ - mode: "docx", - documentMode: "editing", +const editor = await Editor.open(docxFile, { element: document.getElementById("editor"), - documentId: "doc-123", - extensions: getStarterExtensions(), - fileSource: docxFile, - content, - media, - mediaFiles, - fonts, + documentMode: "editing", }); ``` +`Editor.open()` is the recommended way to create an editor. It handles DOCX parsing, extension setup, and mounting automatically. + ## Required Parameters - - DOM element where the editor will mount + + The document source. Can be a file path (Node.js), File/Blob (browser), or Buffer. ```javascript -element: document.getElementById("editor"); -``` +// Browser +const editor = await Editor.open(file, { element: el }); - +// Node.js +const editor = await Editor.open('/path/to/doc.docx'); + +// Blank document +const editor = await Editor.open(); +``` - - Unique identifier for this document instance. Used for collaboration and - storage. - - Extensions that define the editor schema and functionality. + + DOM element where the editor will mount. If omitted, the editor runs in headless mode. ```javascript -import { getStarterExtensions } from "superdoc/super-editor"; - -extensions: getStarterExtensions(); +element: document.getElementById("editor"); ``` -## DOCX Mode Parameters - - - The DOCX file to load + + Unique identifier for this document instance. Used for collaboration and + storage. Auto-generated if not provided. - - Parsed XML content from `Editor.loadXmlData()` - + + Extensions that define the editor schema and functionality. If omitted, `Editor.open()` uses sensible defaults (`getStarterExtensions()` for DOCX, `getRichTextExtensions()` for text/HTML). - - Media file mappings from `Editor.loadXmlData()` - +```javascript +import { getStarterExtensions } from "superdoc/super-editor"; - - Media blob data from `Editor.loadXmlData()` - +const editor = await Editor.open(file, { + element: el, + extensions: getStarterExtensions(), // explicit, but also the default for DOCX +}); +``` - - Font configuration from `Editor.loadXmlData()` ## Modes & Permissions @@ -150,7 +137,7 @@ extensions: getStarterExtensions(); Initialize with Markdown (converts to document) - + Use ProseMirror JSON content instead of DOCX parsing @@ -172,7 +159,7 @@ extensions: getStarterExtensions(); Run without mounting an editor view (Node.js/server-side processing). - You must provide `document` from JSDOM for serialization methods like `getHTML()`. + Automatically set to `true` when no `element` is provided to `Editor.open()`. @@ -183,14 +170,6 @@ extensions: getStarterExtensions(); Y.Doc XML fragment for collaborative document content. Use with headless mode to read Y.Doc content. - - **Deprecated.** Use `document` instead. - - - - **Deprecated.** No longer required — just pass `document`. - - Custom image upload handler @@ -209,27 +188,13 @@ handleImageUpload: async (file) => { ```javascript import "superdoc/style.css"; -import { Editor, getStarterExtensions } from "superdoc/super-editor"; +import { Editor } from "superdoc/super-editor"; -async function createDocxEditor(docxFile) { - const [content, media, mediaFiles, fonts] = await Editor.loadXmlData( - docxFile - ); - - return new Editor({ - mode: "docx", - documentMode: "editing", - element: document.getElementById("editor"), - documentId: "doc-123", - extensions: getStarterExtensions(), - fileSource: docxFile, - content, - media, - mediaFiles, - fonts, - user: { name: "John", email: "john@example.com" }, - }); -} +const editor = await Editor.open(docxFile, { + element: document.getElementById("editor"), + documentMode: "editing", + user: { name: "John", email: "john@example.com" }, +}); ``` ### Headless Converter (Node.js) @@ -244,33 +209,10 @@ Convert DOCX files server-side without a browser using JSDOM. ```javascript import { readFile } from "fs/promises"; -import { JSDOM } from "jsdom"; -import { Editor, getStarterExtensions } from "superdoc/super-editor"; +import { Editor } from "superdoc/super-editor"; -const { window } = new JSDOM(""); -const { document } = window; - -// Pass `true` as second arg for Node.js const buffer = await readFile("document.docx"); -const [content, media, mediaFiles, fonts] = await Editor.loadXmlData( - buffer, - true -); - -const editor = new Editor({ - mode: "docx", - documentId: "headless", - element: document.createElement("div"), - extensions: getStarterExtensions(), - fileSource: buffer, - content, - media, - mediaFiles, - fonts, - isHeadless: true, - mockDocument: document, - mockWindow: window, -}); +const editor = await Editor.open(buffer); // Output formats const html = editor.getHTML(); @@ -286,55 +228,36 @@ editor.destroy(); Read content from a collaborative Y.Doc in your backend — useful for AI agents or APIs that need to access document content without a browser. - Even with `isHeadless: true`, methods like `getHTML()` need a DOM for serialization. Always set up JSDOM first. + Even with headless mode, methods like `getHTML()` need a DOM for serialization. JSDOM is set up automatically in Node.js when using `Editor.open()`. ```javascript -import { JSDOM } from "jsdom"; import { Editor, getStarterExtensions } from "superdoc/super-editor"; -// Set up JSDOM -const { window } = new JSDOM(""); - // Get the YXmlFragment from your Y.Doc const fragment = ydoc.getXmlFragment("prosemirror"); const editor = new Editor({ mode: "docx", isHeadless: true, - document: window.document, extensions: getStarterExtensions(), - fragment, // YXmlFragment from Y.Doc + fragment, }); const html = editor.getHTML(); editor.destroy(); ``` - - The `document` option replaces the deprecated `mockDocument` and `mockWindow` options. - - ### Custom Collaboration ```javascript -import { Editor, getStarterExtensions } from "superdoc/super-editor"; +import { Editor } from "superdoc/super-editor"; import * as Y from "yjs"; import { HocuspocusProvider } from "@hocuspocus/provider"; -const [content, media, mediaFiles, fonts] = await Editor.loadXmlData(docxFile); - -const editor = new Editor({ - mode: "docx", - documentMode: "editing", +const editor = await Editor.open(docxFile, { element: document.getElementById("editor"), - documentId: roomId, - extensions: getStarterExtensions(), - fileSource: docxFile, - content, - media, - mediaFiles, - fonts, + documentMode: "editing", ydoc: new Y.Doc(), collaborationProvider: new HocuspocusProvider({ url: "wss://collab.example.com", @@ -348,19 +271,11 @@ const editor = new Editor({ ### Track Changes Mode ```javascript -const [content, media, mediaFiles, fonts] = await Editor.loadXmlData(docxFile); +import { Editor } from "superdoc/super-editor"; -const editor = new Editor({ - mode: "docx", - documentMode: "suggesting", +const editor = await Editor.open(docxFile, { element: document.getElementById("editor"), - documentId: "review-doc", - extensions: getStarterExtensions(), - fileSource: docxFile, - content, - media, - mediaFiles, - fonts, + documentMode: "suggesting", user: reviewer, }); ``` diff --git a/apps/docs/core/supereditor/overview.mdx b/apps/docs/core/supereditor/overview.mdx index c27f4f5c8d..27ca2d5d39 100644 --- a/apps/docs/core/supereditor/overview.mdx +++ b/apps/docs/core/supereditor/overview.mdx @@ -26,42 +26,22 @@ SuperEditor is the core DOCX editing engine that powers SuperDoc. Use it directl ```javascript import "superdoc/style.css"; -import { Editor, getStarterExtensions } from "superdoc/super-editor"; - -async function initEditor() { - // 1. Load and prepare the DOCX file - const response = await fetch("/document.docx"); - const blob = await response.blob(); - const file = new File([blob], "document.docx", { - type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - }); - - // 2. Parse the DOCX file - const [content, media, mediaFiles, fonts] = await Editor.loadXmlData(file); - - // 3. Create the editor - const editor = new Editor({ - mode: "docx", - documentMode: "editing", - element: document.getElementById("editor"), - documentId: "doc-123", - extensions: getStarterExtensions(), - fileSource: file, - content, - media, - mediaFiles, - fonts, - }); -} - -initEditor(); +import { Editor } from "superdoc/super-editor"; + +// Open a DOCX file in the browser +const response = await fetch("/document.docx"); +const file = await response.blob(); + +const editor = await Editor.open(file, { + element: document.getElementById("editor"), + documentMode: "editing", +}); ``` ## Key Initialization Steps -1. **Import styles and modules** - Import the CSS and the Editor class with extensions -2. **Parse the DOCX** - Use `Editor.loadXmlData(file)` to extract content, media, and fonts -3. **Create the Editor** - Pass all parsed data plus required options like `extensions` +1. **Import styles and the Editor class** +2. **Call `Editor.open()`** - Pass a file source and options. The editor handles parsing, extensions, and mounting automatically. ## Direct ProseMirror access diff --git a/apps/docs/extensions/document-section.mdx b/apps/docs/extensions/document-section.mdx index 9553b375e2..bcfbeea981 100644 --- a/apps/docs/extensions/document-section.mdx +++ b/apps/docs/extensions/document-section.mdx @@ -56,15 +56,11 @@ editor.commands.updateSectionById({ ## Helper Functions -Import helpers: + ```javascript -import { SectionHelpers } from '@harbour-enterprises/superdoc'; -``` - -### Available Helpers +import { SectionHelpers } from 'superdoc'; -```javascript // Get all sections const sections = SectionHelpers.getAllSections(editor); @@ -80,6 +76,8 @@ const childEditor = SectionHelpers.getLinkedSectionEditor( ); ``` + + ## Attributes Section nodes have these attributes: diff --git a/apps/docs/extensions/field-annotation.mdx b/apps/docs/extensions/field-annotation.mdx index 9378a1a42c..05840ec3ec 100644 --- a/apps/docs/extensions/field-annotation.mdx +++ b/apps/docs/extensions/field-annotation.mdx @@ -291,7 +291,8 @@ headerFooterAnnotations.forEach(({ node, pos }) => { Get all field annotations in the document ```javascript -import { getAllFieldAnnotations } from './fieldAnnotationHelpers'; +import { fieldAnnotationHelpers } from 'superdoc'; +const { getAllFieldAnnotations } = fieldAnnotationHelpers; const annotations = getAllFieldAnnotations(editor.state); console.log(`Document contains ${annotations.length} field annotations`); diff --git a/apps/docs/extensions/track-changes.mdx b/apps/docs/extensions/track-changes.mdx index ea610473d1..2720f94358 100644 --- a/apps/docs/extensions/track-changes.mdx +++ b/apps/docs/extensions/track-changes.mdx @@ -38,8 +38,10 @@ editor.commands.toggleTrackChangesShowFinal(); ## Working with changes + + ```javascript -import { trackChangesHelpers } from '@harbour-enterprises/superdoc'; +import { trackChangesHelpers } from 'superdoc'; // Get all changes const changes = trackChangesHelpers.getAllChanges(editor.state); @@ -54,6 +56,8 @@ const userChanges = trackChangesHelpers.getChangesByUser( const isTracking = trackChangesHelpers.isTrackingEnabled(editor.state); ``` + + ## Change types - **Insertions** - Green underline diff --git a/apps/docs/getting-started/ai-agents.mdx b/apps/docs/getting-started/ai-agents.mdx index 0a92ec85b9..e65c443b23 100644 --- a/apps/docs/getting-started/ai-agents.mdx +++ b/apps/docs/getting-started/ai-agents.mdx @@ -20,26 +20,15 @@ Everything in the UI is available via code: ```javascript // Headless document generation (Node/SSR-safe) -import { JSDOM } from 'jsdom'; -import { Editor } from '@harbour-enterprises/super-editor'; - -const { window } = new JSDOM(''); -const { document } = window; - -const editor = new Editor({ - fileSource: docxBuffer, // or initialize with options.html/markdown/json - documentId: 'doc-1', - options: { - isHeadless: true, - mockDocument: document, - mockWindow: window, - documentMode: 'suggesting', - } +import { Editor } from 'superdoc/super-editor'; + +const editor = await Editor.open(docxBuffer, { + documentMode: 'suggesting', }); editor.commands.insertContent(aiContent, { contentType: 'html' }); ``` -[See complete example →](https://github.com/Harbour-Enterprises/SuperDoc/tree/develop/examples/agentic-slack-redlining-example) +[See complete example →](https://github.com/Harbour-Enterprises/superdoc/tree/main/examples/agentic-slack-redlining-example) ## The AI Document Workflow diff --git a/apps/docs/modules/toolbar.mdx b/apps/docs/modules/toolbar.mdx index 41bd642f80..087b4cc1f2 100644 --- a/apps/docs/modules/toolbar.mdx +++ b/apps/docs/modules/toolbar.mdx @@ -544,7 +544,7 @@ modules: { ### Accessing Toolbar - + Toolbar instance when configured diff --git a/packages/super-editor/src/index.js b/packages/super-editor/src/index.js index 1177e15b9f..4785861140 100644 --- a/packages/super-editor/src/index.js +++ b/packages/super-editor/src/index.js @@ -55,7 +55,6 @@ const Extensions = { * Exported classes and components. * @module exports * @see SuperConverter - * @see DocxZipper * @see SuperEditor * @see Toolbar * @see AIWriter @@ -63,14 +62,18 @@ const Extensions = { export { // Classes SuperConverter, + /** @internal */ DocxZipper, SuperToolbar, Editor, + /** @internal */ PresentationEditor, // Components SuperEditor, + /** @internal */ SuperInput, + /** @internal */ BasicUpload, Toolbar, AIWriter, @@ -82,17 +85,23 @@ export { trackChangesHelpers, AnnotatorHelpers, SectionHelpers, + /** @internal */ getMarksFromSelection, + /** @internal */ getActiveFormatting, getStarterExtensions, getRichTextExtensions, createZip, + /** @internal */ getAllowedImageDimensions, + /** @internal */ registeredHandlers, // External extensions classes Extensions, + /** @internal */ TrackChangesBasePluginKey, + /** @internal */ CommentsPluginKey, // Type guards and extension helpers diff --git a/packages/superdoc/src/index.js b/packages/superdoc/src/index.js index f1737c0392..f49f05fd44 100644 --- a/packages/superdoc/src/index.js +++ b/packages/superdoc/src/index.js @@ -43,5 +43,6 @@ export { // Custom extensions Extensions, + /** @internal */ registeredHandlers, }; diff --git a/scripts/docs/scan-coverage.ts b/scripts/docs/scan-coverage.ts new file mode 100644 index 0000000000..5a27d2257c --- /dev/null +++ b/scripts/docs/scan-coverage.ts @@ -0,0 +1,344 @@ +#!/usr/bin/env bun +/** + * Documentation Coverage Scanner + * + * Scans super-editor exports and compares against MDX documentation files. + * Generates a coverage report showing documented vs undocumented exports. + * Filters out exports marked with @internal JSDoc tags. + * + * Usage: bun scripts/docs/scan-coverage.ts + */ + +import { readFileSync, readdirSync, existsSync } from 'fs'; +import { join, basename } from 'path'; + +const ROOT = join(import.meta.dir, '../..'); +const SUPER_EDITOR_SRC = join(ROOT, 'packages/super-editor/src'); +const DOCS_EXTENSIONS = join(ROOT, 'apps/docs/extensions'); + +interface ExportInfo { + name: string; + source: string; + type: 'extension' | 'class' | 'helper' | 'component' | 'other'; + hasDoc: boolean; + isInternal: boolean; +} + +interface CoverageReport { + total: number; + internal: number; + public: number; + documented: number; + undocumented: number; + percentage: number; + exports: ExportInfo[]; +} + +/** + * Parse export statements from a JavaScript file, detecting @internal tags + */ +function parseExports(filePath: string): { name: string; isInternal: boolean }[] { + const content = readFileSync(filePath, 'utf-8'); + const results: { name: string; isInternal: boolean }[] = []; + + // Parse export blocks: export { ... } + // We need line-by-line analysis to detect /** @internal */ comments + const lines = content.split('\n'); + let inExportBlock = false; + let nextIsInternal = false; + + for (const line of lines) { + const trimmed = line.trim(); + + if (trimmed.startsWith('export {') || trimmed.startsWith('export{')) { + inExportBlock = true; + // Check if single-line export + if (trimmed.includes('}')) { + const names = trimmed + .replace(/export\s*\{/, '') + .replace(/\}.*/, '') + .split(',') + .map((s) => + s + .trim() + .split(/\s+as\s+/)[0] + .trim(), + ) + .filter((s) => s && !s.startsWith('//') && !s.startsWith('/**')); + for (const name of names) { + results.push({ name, isInternal: false }); + } + inExportBlock = false; + } + continue; + } + + if (inExportBlock) { + if (trimmed === '}' || trimmed === '};') { + inExportBlock = false; + nextIsInternal = false; + continue; + } + + // Detect @internal comment + if (trimmed.includes('@internal')) { + nextIsInternal = true; + continue; + } + + // Skip pure comments + if (trimmed.startsWith('//') || trimmed.startsWith('/**') || trimmed.startsWith('*')) { + continue; + } + + // Extract export name + const name = trimmed + .replace(/,\s*$/, '') + .split(/\s+as\s+/)[0] + .trim(); + if (name && name !== '') { + results.push({ name, isInternal: nextIsInternal }); + nextIsInternal = false; + } + } + } + + // Also match: export const Name = ... + let match; + const exportConstRegex = /export\s+const\s+(\w+)/g; + while ((match = exportConstRegex.exec(content)) !== null) { + if (!results.find((r) => r.name === match![1])) { + results.push({ name: match[1], isInternal: false }); + } + } + + // Match: export function Name(... + const exportFuncRegex = /export\s+function\s+(\w+)/g; + while ((match = exportFuncRegex.exec(content)) !== null) { + if (!results.find((r) => r.name === match![1])) { + results.push({ name: match[1], isInternal: false }); + } + } + + // Match: export class Name + const exportClassRegex = /export\s+class\s+(\w+)/g; + while ((match = exportClassRegex.exec(content)) !== null) { + if (!results.find((r) => r.name === match![1])) { + results.push({ name: match[1], isInternal: false }); + } + } + + // Dedupe by name (keep first occurrence) + const seen = new Set(); + return results.filter((r) => { + if (seen.has(r.name)) return false; + seen.add(r.name); + return true; + }); +} + +/** + * Get all documented extensions from MDX files + */ +function getDocumentedExtensions(): Set { + const documented = new Set(); + + if (!existsSync(DOCS_EXTENSIONS)) { + return documented; + } + + const files = readdirSync(DOCS_EXTENSIONS); + for (const file of files) { + if (file.endsWith('.mdx')) { + const name = basename(file, '.mdx'); + documented.add(name.toLowerCase()); + + const content = readFileSync(join(DOCS_EXTENSIONS, file), 'utf-8'); + const exportMatches = content.matchAll(/`(\w+)`/g); + for (const match of exportMatches) { + documented.add(match[1].toLowerCase()); + } + } + } + + return documented; +} + +/** + * Categorize an export based on naming conventions + */ +function categorizeExport(name: string): ExportInfo['type'] { + const lowerName = name.toLowerCase(); + + if (lowerName.includes('helper')) return 'helper'; + if (lowerName.includes('editor') || lowerName.includes('converter')) return 'class'; + if ( + lowerName.endsWith('vue') || + ['SuperEditor', 'Toolbar', 'SlashMenu', 'AIWriter', 'SuperInput', 'BasicUpload'].includes(name) + ) + return 'component'; + if ( + name[0] === name[0].toUpperCase() && + !name.includes('_') && + ![ + 'Extensions', + 'Plugin', + 'PluginKey', + 'Decoration', + 'DecorationSet', + 'TrackChangesBasePluginKey', + 'CommentsPluginKey', + ].includes(name) + ) { + return 'extension'; + } + + return 'other'; +} + +/** + * Check if an export is documented + */ +function isDocumented(name: string, documented: Set): boolean { + const lowerName = name.toLowerCase(); + + if (documented.has(lowerName)) return true; + + const withoutSuffix = lowerName.replace(/(extension|plugin|mark|node)$/, ''); + if (documented.has(withoutSuffix)) return true; + + const kebab = lowerName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); + if (documented.has(kebab)) return true; + + return false; +} + +/** + * Main scanner function + */ +function scanCoverage(): CoverageReport { + const documented = getDocumentedExtensions(); + + const entryPoints = [join(SUPER_EDITOR_SRC, 'index.js'), join(SUPER_EDITOR_SRC, 'extensions/index.js')]; + + const allExports: ExportInfo[] = []; + + for (const entryPoint of entryPoints) { + if (!existsSync(entryPoint)) { + console.warn(`Entry point not found: ${entryPoint}`); + continue; + } + + const exports = parseExports(entryPoint); + for (const { name, isInternal } of exports) { + if (name.startsWith('_') || name === 'default') continue; + + const type = categorizeExport(name); + const hasDoc = isDocumented(name, documented); + + if (!allExports.find((e) => e.name === name)) { + allExports.push({ + name, + source: basename(entryPoint), + type, + hasDoc, + isInternal, + }); + } + } + } + + const internalCount = allExports.filter((e) => e.isInternal).length; + const publicExports = allExports.filter((e) => !e.isInternal); + const documentedCount = publicExports.filter((e) => e.hasDoc).length; + const publicTotal = publicExports.length; + + return { + total: allExports.length, + internal: internalCount, + public: publicTotal, + documented: documentedCount, + undocumented: publicTotal - documentedCount, + percentage: publicTotal > 0 ? Math.round((documentedCount / publicTotal) * 100) : 0, + exports: allExports, + }; +} + +/** + * Print coverage report + */ +function printReport(report: CoverageReport) { + console.log('\n========================================'); + console.log(' SuperDoc Documentation Coverage'); + console.log('========================================\n'); + + console.log(`Total exports: ${report.total}`); + console.log(`Internal (@internal): ${report.internal}`); + console.log(`Public exports: ${report.public}`); + console.log(`Documented: ${report.documented} (${report.percentage}%)`); + console.log(`Undocumented: ${report.undocumented} (${100 - report.percentage}%)\n`); + + // Show internal exports + const internal = report.exports.filter((e) => e.isInternal); + if (internal.length > 0) { + console.log('--- Internal Exports (excluded from coverage) ---\n'); + for (const exp of internal) { + console.log(` @internal ${exp.name} (${exp.type})`); + } + console.log(''); + } + + // Group public by type + const publicExports = report.exports.filter((e) => !e.isInternal); + const byType = new Map(); + for (const exp of publicExports) { + const list = byType.get(exp.type) || []; + list.push(exp); + byType.set(exp.type, list); + } + + console.log('--- Public Coverage by Type ---\n'); + for (const [type, exports] of byType) { + const documented = exports.filter((e) => e.hasDoc).length; + const pct = Math.round((documented / exports.length) * 100); + console.log(`${type.padEnd(12)} ${documented}/${exports.length} (${pct}%)`); + } + + console.log('\n--- Undocumented Public Exports ---\n'); + for (const [type, exports] of byType) { + const undoc = exports.filter((e) => !e.hasDoc); + if (undoc.length === 0) continue; + + console.log(`[${type}]`); + for (const exp of undoc) { + console.log(` - ${exp.name}`); + } + console.log(''); + } + + console.log('--- Documented Public Exports ---\n'); + const doc = publicExports.filter((e) => e.hasDoc); + for (const exp of doc.slice(0, 20)) { + console.log(` ✓ ${exp.name} (${exp.type})`); + } + if (doc.length > 20) { + console.log(` ... and ${doc.length - 20} more\n`); + } + + console.log('\n========================================'); + console.log(' Gap Assessment'); + console.log('========================================\n'); + + if (report.percentage >= 80) { + console.log('✅ Coverage is GOOD (≥80%).'); + } else if (report.percentage >= 50) { + console.log('⚠️ Coverage is MODERATE (50-80%). Consider prioritizing core APIs first.'); + } else { + console.log('❌ Coverage is LOW (<50%). Consider grandfathering existing + progressive rollout.'); + } + console.log(''); +} + +// Run +const report = scanCoverage(); +printReport(report); From 5244f2374f7dfc98dfb32e896fe65f9a195a805a Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Thu, 5 Feb 2026 20:38:25 -0300 Subject: [PATCH 02/45] docs: replace @harbour-enterprises/superdoc with superdoc --- apps/docs/core/superdoc/overview.mdx | 2 +- apps/docs/core/superdoc/types.mdx | 2 +- apps/docs/extensions/creating-extensions.mdx | 6 ++--- apps/docs/extensions/document-section.mdx | 2 +- .../getting-started/frameworks/angular.mdx | 4 ++-- .../getting-started/frameworks/blazor.mdx | 12 +++++----- .../getting-started/frameworks/nextjs.mdx | 4 ++-- apps/docs/getting-started/frameworks/nuxt.mdx | 8 +++---- apps/docs/getting-started/frameworks/php.mdx | 8 +++---- .../docs/getting-started/frameworks/react.mdx | 14 +++++------ .../frameworks/ruby-on-rails.mdx | 6 ++--- .../getting-started/frameworks/svelte.mdx | 8 +++---- .../getting-started/frameworks/vanilla-js.mdx | 24 +++++++++---------- apps/docs/getting-started/frameworks/vue.mdx | 18 +++++++------- apps/docs/guides/migration/prosemirror.mdx | 2 +- .../snippets/components/superdoc-editor.jsx | 4 ++-- 16 files changed, 62 insertions(+), 62 deletions(-) diff --git a/apps/docs/core/superdoc/overview.mdx b/apps/docs/core/superdoc/overview.mdx index fc9a1232ff..71796a7492 100644 --- a/apps/docs/core/superdoc/overview.mdx +++ b/apps/docs/core/superdoc/overview.mdx @@ -9,7 +9,7 @@ The SuperDoc instance is your main interface for controlling the DOCX editor. It ## Creating an instance ```javascript -import { SuperDoc } from '@harbour-enterprises/superdoc'; +import { SuperDoc } from 'superdoc'; const superdoc = new SuperDoc({ selector: '#editor', diff --git a/apps/docs/core/superdoc/types.mdx b/apps/docs/core/superdoc/types.mdx index f512ca6d3d..1e9a57a147 100644 --- a/apps/docs/core/superdoc/types.mdx +++ b/apps/docs/core/superdoc/types.mdx @@ -29,7 +29,7 @@ Returns JSON schema summary with all nodes, marks, and their attributes. Useful Supports different modes: `docx`, `html`, `text` ```javascript -import { getSchemaIntrospection } from '@harbour-enterprises/superdoc'; +import { getSchemaIntrospection } from 'superdoc'; const schema = await getSchemaIntrospection({ mode: 'docx' }); // Returns: { version, nodes: [...], marks: [...] } diff --git a/apps/docs/extensions/creating-extensions.mdx b/apps/docs/extensions/creating-extensions.mdx index af7ae4382f..233de0acf6 100644 --- a/apps/docs/extensions/creating-extensions.mdx +++ b/apps/docs/extensions/creating-extensions.mdx @@ -8,7 +8,7 @@ Create extensions to add custom features to SuperDoc. ## Basic extension ```javascript -import { Extensions } from '@harbour-enterprises/superdoc'; +import { Extensions } from 'superdoc'; const { Extension } = Extensions; const MyExtension = Extension.create({ @@ -34,7 +34,7 @@ editor.commands.myCommand(); For document elements: ```javascript -import { Extensions } from '@harbour-enterprises/superdoc'; +import { Extensions } from 'superdoc'; const { Node } = Extensions; const CustomBlock = Node.create({ @@ -56,7 +56,7 @@ const CustomBlock = Node.create({ For inline formatting: ```javascript -import { Extensions } from '@harbour-enterprises/superdoc'; +import { Extensions } from 'superdoc'; const { Mark } = Extensions; const Highlight = Mark.create({ diff --git a/apps/docs/extensions/document-section.mdx b/apps/docs/extensions/document-section.mdx index bcfbeea981..69287cdb5a 100644 --- a/apps/docs/extensions/document-section.mdx +++ b/apps/docs/extensions/document-section.mdx @@ -10,7 +10,7 @@ Encapsulate and manage discrete parts of documents. Legal clauses stay locked wh Included by default in SuperDoc. ```javascript -import { DocumentSection } from '@harbour-enterprises/superdoc/extensions'; +import { DocumentSection } from 'superdoc/extensions'; ``` ## Configuration diff --git a/apps/docs/getting-started/frameworks/angular.mdx b/apps/docs/getting-started/frameworks/angular.mdx index d0a10fb08e..63b594d195 100644 --- a/apps/docs/getting-started/frameworks/angular.mdx +++ b/apps/docs/getting-started/frameworks/angular.mdx @@ -8,14 +8,14 @@ SuperDoc works with Angular through direct DOM manipulation. ## Installation ```bash -npm install @harbour-enterprises/superdoc +npm install superdoc ``` ## Basic component ```typescript import { Component, ElementRef, ViewChild, OnInit, OnDestroy } from '@angular/core'; -import { SuperDoc } from '@harbour-enterprises/superdoc'; +import { SuperDoc } from 'superdoc'; @Component({ selector: 'app-document-editor', diff --git a/apps/docs/getting-started/frameworks/blazor.mdx b/apps/docs/getting-started/frameworks/blazor.mdx index 6c00bb210c..0861e4f942 100644 --- a/apps/docs/getting-started/frameworks/blazor.mdx +++ b/apps/docs/getting-started/frameworks/blazor.mdx @@ -41,8 +41,8 @@ public class DocumentController : Controller
-``` - -## Blazor Server - -```csharp -// Pages/DocumentEditor.razor -@page "/document/{DocumentId:int}" -@inject IJSRuntime JS -@inject AuthenticationStateProvider AuthProvider - -
- -@code { - [Parameter] public int DocumentId { get; set; } - - private ElementReference editorElement; - private IJSObjectReference? superdocModule; - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - var authState = await AuthProvider.GetAuthenticationStateAsync(); - var user = authState.User; - - superdocModule = await JS.InvokeAsync( - "import", "/_content/YourApp/superdoc-interop.js"); - - await superdocModule.InvokeVoidAsync("initSuperDoc", - editorElement, - $"/api/documents/{DocumentId}", - user.Identity.Name, - user.FindFirst(ClaimTypes.Email)?.Value); - } - } - - public async ValueTask DisposeAsync() - { - if (superdocModule != null) - { - await superdocModule.InvokeVoidAsync("cleanup"); - await superdocModule.DisposeAsync(); - } - } -} -``` - -```javascript -// wwwroot/superdoc-interop.js -let superdoc = null; - -export async function initSuperDoc(element, documentUrl, userName, userEmail) { - const { SuperDoc } = await import('https://cdn.jsdelivr.net/npm/superdoc/dist/superdoc.es.js'); - - superdoc = new SuperDoc({ - selector: element, - document: documentUrl, - user: { - name: userName, - email: userEmail - } - }); -} - -export function cleanup() { - superdoc = null; -} -``` - -## Blazor WebAssembly - -```csharp -// Pages/Editor.razor -@page "/editor" -@inject HttpClient Http -@inject IJSRuntime JS - -
- -@code { - private ElementReference editorElement; - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - // Fetch document as blob - var documentBytes = await Http.GetByteArrayAsync("api/documents/sample.docx"); - - // Pass to JavaScript - await JS.InvokeVoidAsync("initEditorWithBlob", - editorElement, - documentBytes); - } - } -} -``` - -```javascript -// wwwroot/index.html -window.initEditorWithBlob = async (element, byteArray) => { - const { SuperDoc } = await import('https://cdn.jsdelivr.net/npm/superdoc/dist/superdoc.es.js'); - - const blob = new Blob([byteArray], { - type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' - }); - - // Convert Blob to File - const file = new File([blob], 'document.docx', { type: blob.type }); - - new SuperDoc({ - selector: element, - document: file - }); -}; -``` - -## File upload - -```csharp -// API/DocumentsController.cs -[ApiController] -[Route("api/[controller]")] -public class DocumentsController : ControllerBase -{ - [HttpPost] - public async Task Upload(IFormFile file) - { - if (file?.Length > 0) - { - var fileName = $"{Guid.NewGuid()}.docx"; - var path = Path.Combine("Documents", fileName); - - using (var stream = new FileStream(path, FileMode.Create)) - { - await file.CopyToAsync(stream); - } - - return Ok(new { fileName }); - } - - return BadRequest(); - } -} -``` \ No newline at end of file diff --git a/apps/docs/getting-started/frameworks/nextjs.mdx b/apps/docs/getting-started/frameworks/nextjs.mdx deleted file mode 100644 index 76848b6884..0000000000 --- a/apps/docs/getting-started/frameworks/nextjs.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Next.js -keywords: "nextjs docx editor, next word editor, superdoc nextjs, ssr document editor, dynamic import docx" ---- - -SuperDoc works with Next.js using dynamic imports to avoid SSR issues. - -## Installation - -```bash -npm install superdoc -``` - -## Basic component - -```jsx -// components/DocumentEditor.jsx -import { useEffect, useRef } from 'react'; -import dynamic from 'next/dynamic'; - -// Prevent SSR issues -const DocumentEditor = dynamic( - () => Promise.resolve(DocumentEditorComponent), - { ssr: false } -); - -function DocumentEditorComponent({ document }) { - const containerRef = useRef(null); - const superdocRef = useRef(null); - - useEffect(() => { - const initEditor = async () => { - const { SuperDoc } = await import('superdoc'); - - if (containerRef.current) { - superdocRef.current = new SuperDoc({ - selector: containerRef.current, - document - }); - } - }; - - initEditor(); - - return () => { - superdocRef.current = null; - }; - }, [document]); - - return
; -} - -export default DocumentEditor; -``` - -## App Router (Next.js 13+) - -```jsx -// app/editor/page.jsx -'use client'; - -import dynamic from 'next/dynamic'; - -const DocumentEditor = dynamic( - () => import('@/components/DocumentEditor'), - { - ssr: false, - loading: () =>
Loading editor...
- } -); - -export default function EditorPage() { - return ( -
- -
- ); -} -``` - -## API route for document handling - -```javascript -// pages/api/documents/[id].js (Pages Router) -// app/api/documents/[id]/route.js (App Router) - -export async function GET(request, { params }) { - const docId = params.id; - - // Fetch document from storage - const document = await fetchDocumentFromStorage(docId); - - return new Response(document, { - headers: { - 'Content-Type': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' - } - }); -} -``` - -## With authentication - -```jsx -// components/SecureEditor.jsx -import { useSession } from 'next-auth/react'; -import dynamic from 'next/dynamic'; - -const DocumentEditor = dynamic(() => import('./DocumentEditor'), { ssr: false }); - -export default function SecureEditor() { - const { data: session, status } = useSession(); - - if (status === 'loading') return
Loading...
; - if (!session) return
Please sign in
; - - return ( - - ); -} -``` \ No newline at end of file diff --git a/apps/docs/getting-started/frameworks/nuxt.mdx b/apps/docs/getting-started/frameworks/nuxt.mdx deleted file mode 100644 index 119ba0c834..0000000000 --- a/apps/docs/getting-started/frameworks/nuxt.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Nuxt.js -keywords: "nuxt docx editor, nuxt word editor, superdoc nuxt, nuxt3 document editor, vue ssr docx" ---- - -SuperDoc requires client-side rendering in Nuxt due to DOM dependencies. - -## Installation - -```bash -npm install superdoc -``` - -## Basic component - -```vue - - - - - - -``` - -## Plugin setup (Nuxt 3) - -```javascript -// plugins/superdoc.client.js -export default defineNuxtPlugin(() => { - return { - provide: { - initSuperDoc: async (element, options) => { - const { SuperDoc } = await import('superdoc'); - return new SuperDoc({ selector: element, ...options }); - } - } - }; -}); - -// Usage in component -const { $initSuperDoc } = useNuxtApp(); - -onMounted(async () => { - superdoc = await $initSuperDoc(editor.value, { - document: props.document - }); -}); -``` - -## API endpoint - -```javascript -// server/api/documents/[id].get.js -import { readFile } from 'fs/promises'; -import { resolve } from 'path'; - -export default defineEventHandler(async (event) => { - const id = getRouterParam(event, 'id'); - const filePath = resolve('storage/documents', `${id}.docx`); - - try { - const file = await readFile(filePath); - setHeader(event, 'Content-Type', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'); - return file; - } catch { - throw createError({ statusCode: 404, statusMessage: 'Document not found' }); - } -}); -``` - -## With authentication (Nuxt 3) - -```vue - - - -``` \ No newline at end of file diff --git a/apps/docs/getting-started/frameworks/php.mdx b/apps/docs/getting-started/frameworks/php.mdx deleted file mode 100644 index b36ba7a0b9..0000000000 --- a/apps/docs/getting-started/frameworks/php.mdx +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: PHP -keywords: "php docx editor, php word editor, superdoc php, server side docx, php document editor" ---- - -SuperDoc runs client-side but PHP can handle document storage and serving. - -## Basic HTML template - -```php - - - - - - -
- - - - -``` - -## Serving documents - -```php -// document.php - $documentId]); -} -?> -``` - -## Complete PHP example - -```php - 'Guest', 'email' => 'guest@example.com']; -?> - - - - Document Editor - - - - -
- - - - -``` - -## Laravel integration - -```php -// routes/web.php -Route::get('/editor/{document}', function ($documentId) { - return view('editor', ['documentId' => $documentId]); -})->middleware('auth'); - -// resources/views/editor.blade.php -@extends('layout') - -@section('content') -
- - -@endsection -``` \ No newline at end of file diff --git a/apps/docs/getting-started/frameworks/ruby-on-rails.mdx b/apps/docs/getting-started/frameworks/ruby-on-rails.mdx deleted file mode 100644 index e4d573276e..0000000000 --- a/apps/docs/getting-started/frameworks/ruby-on-rails.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: Ruby on Rails -keywords: "rails docx editor, ruby word editor, superdoc rails, ruby document editor, rails integration" ---- - -SuperDoc integrates with Rails for document storage and serving. - -## Installation - -Add to your layout: - -```erb - -<%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/superdoc/dist/style.css" %> -``` - -## Basic view - -```erb - -
- - -``` - -## Active Storage integration - -```ruby -# app/models/document.rb -class Document < ApplicationRecord - has_one_attached :file - belongs_to :user - - validates :file, content_type: ['application/vnd.openxmlformats-officedocument.wordprocessingml.document'] -end - -# app/controllers/documents_controller.rb -class DocumentsController < ApplicationController - before_action :authenticate_user! - - def show - @document = Document.find(params[:id]) - - respond_to do |format| - format.html - format.docx { redirect_to rails_blob_path(@document.file, disposition: "inline") } - end - end - - def create - @document = current_user.documents.build(document_params) - - if @document.save - redirect_to edit_document_path(@document) - else - render :new - end - end - - private - - def document_params - params.require(:document).permit(:file) - end -end -``` - -## Stimulus controller - -```javascript -// app/javascript/controllers/document_editor_controller.js -import { Controller } from "@hotwired/stimulus" - -export default class extends Controller { - static values = { - url: String, - user: Object - } - - async connect() { - const { SuperDoc } = await import('superdoc'); - - this.superdoc = new SuperDoc({ - selector: this.element, - document: this.urlValue, - user: this.userValue - }); - } - - disconnect() { - this.superdoc = null; - } - - async export() { - if (this.superdoc) { - await this.superdoc.export(); - } - } -} -``` - -```erb - -
-
- - -``` - -## Upload handling - -```ruby -# config/routes.rb -resources :documents do - member do - post :upload - end -end - -# app/controllers/documents_controller.rb -def upload - @document = Document.find(params[:id]) - @document.file.attach(params[:file]) - - render json: { url: rails_blob_path(@document.file) } -end -``` \ No newline at end of file diff --git a/apps/docs/getting-started/frameworks/svelte.mdx b/apps/docs/getting-started/frameworks/svelte.mdx deleted file mode 100644 index c61eb3a409..0000000000 --- a/apps/docs/getting-started/frameworks/svelte.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Svelte -keywords: "svelte docx editor, svelte word component, superdoc svelte, svelte document editor, svelte integration" ---- - -SuperDoc integrates with Svelte through lifecycle functions. - -## Installation - -```bash -npm install superdoc -``` - -## Basic component - -```svelte - - - -
- - -``` - -## With props - -```svelte - - -
-``` - -## Store integration - -```javascript -// documentStore.js -import { writable } from 'svelte/store'; - -export const superdocInstance = writable(null); - -// Component.svelte - -``` \ No newline at end of file diff --git a/apps/docs/getting-started/installation.mdx b/apps/docs/getting-started/installation.mdx index 37d1814f5a..a5fcb4e644 100644 --- a/apps/docs/getting-started/installation.mdx +++ b/apps/docs/getting-started/installation.mdx @@ -93,27 +93,6 @@ href="/getting-started/frameworks/react"> href="/getting-started/frameworks/angular"> - - - - -} -href="/getting-started/frameworks/svelte"> - - } href="/getting-started/frameworks/nextjs"> - - - - - -} href="/getting-started/frameworks/php"> - - - - - - - - - -} -href="/getting-started/frameworks/nuxt"> - - - - - - - - - - -} -href="/getting-started/frameworks/ruby-on-rails"> - - - - - - -} -href="/getting-started/frameworks/blazor"> - - + From 3371b8cabcf4f2a499b9939242b2f2aa7aa9d95b Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 10:53:17 -0300 Subject: [PATCH 26/45] docs: align getting started pages with brand voice Sentence case headings, remove "we" framing, remove leftover Next.js card from installation page. --- apps/docs/getting-started/ai-agents.mdx | 10 ++++----- .../docs/getting-started/frameworks/react.mdx | 12 +++++----- .../getting-started/frameworks/vanilla-js.mdx | 8 +++---- apps/docs/getting-started/frameworks/vue.mdx | 12 +++++----- apps/docs/getting-started/import-export.mdx | 22 +++++++++---------- apps/docs/getting-started/installation.mdx | 17 +------------- 6 files changed, 32 insertions(+), 49 deletions(-) diff --git a/apps/docs/getting-started/ai-agents.mdx b/apps/docs/getting-started/ai-agents.mdx index 45f4a9bdee..ccc0fa9c5d 100644 --- a/apps/docs/getting-started/ai-agents.mdx +++ b/apps/docs/getting-started/ai-agents.mdx @@ -6,7 +6,7 @@ keywords: "ai document editing, llm docx, headless editor, document automation a SuperDoc can run headless in Node.js for server-side document processing, AI agent workflows, and batch automation. -## Quick Example +## Quick example ```javascript import { Editor } from 'superdoc/super-editor'; @@ -25,7 +25,7 @@ editor.commands.insertContent(completion.choices[0].message.content, { const docx = await editor.exportDocx(); ``` -## Content Formats +## Content formats ```javascript editor.commands.insertContent(value, { contentType: 'html' }); // Recommended for LLMs @@ -36,7 +36,7 @@ editor.commands.insertContent(value, { contentType: 'schema' }); // ProseMir See [Import/Export](/getting-started/import-export) for format details, limitations, and guidance on choosing a format. -## AI Redlining with Track Changes +## AI redlining with track changes Use `suggesting` mode so AI edits appear as tracked changes that users can accept or reject: @@ -51,7 +51,7 @@ editor.commands.insertContent(aiRevisions, { contentType: 'html' }); const redlined = await editor.exportDocx(); ``` -## LLM Quick Reference +## LLM quick reference Point your AI assistant at these URLs for SuperDoc context: @@ -60,7 +60,7 @@ https://docs.superdoc.dev/llms.txt // Quick reference https://docs.superdoc.dev/llms-full.txt // Complete documentation ``` -## Next Steps +## Next steps ( ); ``` -## SSR Support +## SSR support For Next.js or other SSR frameworks: @@ -228,7 +228,7 @@ function SafeEditor(props) { } ``` -## Custom Hook +## Custom hook ```jsx function useSuperDoc(config) { @@ -261,7 +261,7 @@ function useSuperDoc(config) { } ``` -## Next Steps +## Next steps - [Vue Integration](/getting-started/frameworks/vue) - Vue setup - [API Reference](/core/superdoc/configuration) - Configuration options diff --git a/apps/docs/getting-started/frameworks/vanilla-js.mdx b/apps/docs/getting-started/frameworks/vanilla-js.mdx index e9e40aba31..95a194dff9 100644 --- a/apps/docs/getting-started/frameworks/vanilla-js.mdx +++ b/apps/docs/getting-started/frameworks/vanilla-js.mdx @@ -6,7 +6,7 @@ keywords: "vanilla javascript docx, plain js word editor, superdoc vanilla, no f SuperDoc works with plain JavaScript. No framework required. -## Basic Setup +## Basic setup @@ -44,7 +44,7 @@ const superdoc = new SuperDoc({ -## Load Documents +## Load documents @@ -86,7 +86,7 @@ new SuperDoc({ -## Complete Example +## Complete example @@ -174,7 +174,7 @@ document.getElementById('export-btn').addEventListener('click', async () => { -## Next Steps +## Next steps - [API Reference](/core/superdoc/configuration) - Configuration options - [React Integration](/getting-started/frameworks/react) - Using with React diff --git a/apps/docs/getting-started/frameworks/vue.mdx b/apps/docs/getting-started/frameworks/vue.mdx index 895a5b2f43..e05ff84821 100644 --- a/apps/docs/getting-started/frameworks/vue.mdx +++ b/apps/docs/getting-started/frameworks/vue.mdx @@ -11,9 +11,7 @@ SuperDoc works with Vue 3.0+ using Composition API, Options API, or ` ``` -## TypeScript Support +## TypeScript support ```vue ``` -## Next Steps +## Next steps - [React Integration](/getting-started/frameworks/react) - React setup - [API Reference](/core/superdoc/configuration) - Configuration options diff --git a/apps/docs/getting-started/import-export.mdx b/apps/docs/getting-started/import-export.mdx index a0006e70b1..41fd84bc28 100644 --- a/apps/docs/getting-started/import-export.mdx +++ b/apps/docs/getting-started/import-export.mdx @@ -6,7 +6,7 @@ keywords: "import, export, docx export, html import, markdown import, document f SuperDoc is a Word editor that accepts multiple content formats as input. All content is normalized into Word's document model internally. -## Supported Formats +## Supported formats | Format | Import | Export | Round-Trip | Use Case | |---|---|---|---|---| @@ -20,9 +20,9 @@ SuperDoc is a Word editor that accepts multiple content formats as input. All co HTML and Markdown imports preserve structure (headings, lists, links, tables) but strip CSS styles. -## Importing Content +## Importing content -### At Initialization +### At initialization Pass content when creating the SuperDoc instance. @@ -71,7 +71,7 @@ new SuperDoc({ ProseMirror JSON to override the document content with. -### After Initialization +### After initialization Insert content into an existing document using editor commands. @@ -89,9 +89,9 @@ superdoc.activeEditor.commands.insertContent(content, { Content type: `'html'`, `'markdown'`, `'text'`, or `'schema'` -## Exporting Content +## Exporting content -### DOCX Export +### DOCX export ```javascript // Download as .docx file @@ -142,7 +142,7 @@ await superdoc.export({ exportedName: 'Final Contract' }); Filenames for additional files -### HTML Export +### HTML export ```javascript // Returns array of HTML strings (one per document) @@ -156,7 +156,7 @@ const html = superdoc.activeEditor.getHTML(); HTML export is structure-only. Custom CSS styling and Word-specific formatting are not included. -### JSON Export +### JSON export ```javascript // From the active editor @@ -165,14 +165,14 @@ const json = superdoc.activeEditor.getJSON(); JSON export preserves the full document structure and can be re-imported with `jsonOverride`. -### Markdown Export +### Markdown export ```javascript // From the active editor const markdown = await superdoc.activeEditor.getMarkdown(); ``` -## HTML Element Mapping +## HTML element mapping | HTML Element | Imported As | Notes | |---|---|---| @@ -189,7 +189,7 @@ const markdown = await superdoc.activeEditor.getMarkdown(); CSS classes, IDs, colors, fonts, margins, and other styling are stripped on import. -## Markdown Element Mapping +## Markdown element mapping **Supported:** - Headings (`#` through `######`) diff --git a/apps/docs/getting-started/installation.mdx b/apps/docs/getting-started/installation.mdx index a5fcb4e644..4196de686a 100644 --- a/apps/docs/getting-started/installation.mdx +++ b/apps/docs/getting-started/installation.mdx @@ -2,7 +2,7 @@ title: Installation keywords: "superdoc npm, docx editor install, word editor sdk, javascript document editor, react word editor, vue docx editor" --- -SuperDoc works with any JavaScript framework—React, Vue, Angular, or vanilla JavaScript. Choose your stack, we handle the DOCX complexity. +SuperDoc works with any JavaScript framework. Pick your stack and start editing DOCX files in minutes. @@ -93,19 +93,4 @@ href="/getting-started/frameworks/react"> href="/getting-started/frameworks/angular"> - - - - -} -href="/getting-started/frameworks/nextjs"> - - From 21865816d34afff6d54e42d4d64c2fa5fbcdf4f0 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 10:54:18 -0300 Subject: [PATCH 27/45] docs: sentence case headings in core API reference pages --- apps/docs/core/superdoc/configuration.mdx | 16 ++++++------- apps/docs/core/superdoc/events.mdx | 18 +++++++-------- apps/docs/core/superdoc/methods.mdx | 18 +++++++-------- apps/docs/core/supereditor/configuration.mdx | 24 ++++++++++---------- apps/docs/core/supereditor/methods.mdx | 10 ++++---- apps/docs/core/supereditor/overview.mdx | 4 ++-- 6 files changed, 45 insertions(+), 45 deletions(-) diff --git a/apps/docs/core/superdoc/configuration.mdx b/apps/docs/core/superdoc/configuration.mdx index 67121d0e8a..fa9bf3f0bd 100644 --- a/apps/docs/core/superdoc/configuration.mdx +++ b/apps/docs/core/superdoc/configuration.mdx @@ -5,7 +5,7 @@ keywords: "superdoc configuration, editor config options, document settings, wor Configuration is passed when creating a SuperDoc instance. Only two fields are required. -## Quick Start +## Quick start ```javascript new SuperDoc({ @@ -14,7 +14,7 @@ new SuperDoc({ }); ``` -## Core Parameters +## Core parameters DOM selector or element where SuperDoc will mount. @@ -68,7 +68,7 @@ new SuperDoc({ Auto-generated UUID if not provided -## User & Permissions +## User & permissions Current user information @@ -150,7 +150,7 @@ new SuperDoc({ Configure optional modules -### Collaboration Module +### Collaboration module Real-time collaboration settings @@ -170,7 +170,7 @@ new SuperDoc({ -### Comments Module +### Comments module Comments system configuration @@ -190,7 +190,7 @@ new SuperDoc({ -### Toolbar Module +### Toolbar module Toolbar configuration @@ -267,7 +267,7 @@ new SuperDoc({ Alternative to `modules.toolbar.selector` -## Advanced Options +## Advanced options Additional SuperDoc extensions @@ -318,7 +318,7 @@ new SuperDoc({ Content Security Policy nonce -## Event Handlers +## Event handlers All handlers are optional functions in the configuration: diff --git a/apps/docs/core/superdoc/events.mdx b/apps/docs/core/superdoc/events.mdx index 4da75c5228..47ef05628b 100644 --- a/apps/docs/core/superdoc/events.mdx +++ b/apps/docs/core/superdoc/events.mdx @@ -5,7 +5,7 @@ keywords: "superdoc events, document events, editor callbacks, word editor liste SuperDoc uses an event system for lifecycle hooks and change notifications. -## Subscribing to Events +## Subscribing to events ```javascript superdoc.on('ready', handler); // Subscribe @@ -13,7 +13,7 @@ superdoc.once('ready', handler); // One-time listener superdoc.off('ready', handler); // Unsubscribe ``` -## Lifecycle Events +## Lifecycle events ### `ready` @@ -55,7 +55,7 @@ superdoc.on('editorDestroy', () => { }); ``` -## Content Events +## Content events ### `editor-update` @@ -89,7 +89,7 @@ superdoc.on('fonts-resolved', ({ documentFonts, unsupportedFonts }) => { }); ``` -## Comments Events +## Comments events ### `comments-update` @@ -101,7 +101,7 @@ superdoc.on('comments-update', ({ type, data }) => { }); ``` -## Collaboration Events +## Collaboration events ### `collaboration-ready` @@ -136,7 +136,7 @@ superdoc.on('locked', ({ isLocked, lockedBy }) => { }); ``` -## UI Events +## UI events ### `sidebar-toggle` @@ -148,7 +148,7 @@ superdoc.on('sidebar-toggle', (isOpened) => { }); ``` -## Error Events +## Error events ### `exception` @@ -160,7 +160,7 @@ superdoc.on('exception', ({ error, document, editor }) => { }); ``` -## Configuration-Based Events +## Configuration-based events Events can also be set during initialization: @@ -178,7 +178,7 @@ new SuperDoc({ }); ``` -## Event Order +## Event order 1. `editorBeforeCreate` — Before editor mounts 2. `editorCreate` — Editor ready diff --git a/apps/docs/core/superdoc/methods.mdx b/apps/docs/core/superdoc/methods.mdx index 89162fdcd8..a1ffe8a3a6 100644 --- a/apps/docs/core/superdoc/methods.mdx +++ b/apps/docs/core/superdoc/methods.mdx @@ -5,7 +5,7 @@ keywords: "superdoc methods, document api methods, editor functions, word docume Methods are functions you call on the SuperDoc instance to perform actions. -## Document Operations +## Document operations ### `export` @@ -75,7 +75,7 @@ Get HTML content of all editors. const htmlArray = superdoc.getHTML(); ``` -## Mode Control +## Mode control ### `setDocumentMode` @@ -123,7 +123,7 @@ Enable/disable high contrast mode. superdoc.setHighContrastMode(true); ``` -## UI Methods +## UI methods ### `setActiveEditor` @@ -190,7 +190,7 @@ Focus the active editor or first available. superdoc.focus(); ``` -## Search Methods +## Search methods ### `search` @@ -219,7 +219,7 @@ Navigate to a search result. superdoc.goToSearchResult(results[0]); ``` -## Comments Methods +## Comments methods ### `addCommentsList` @@ -241,7 +241,7 @@ Remove the comments list. superdoc.removeCommentsList(); ``` -## User Management +## User management ### `addSharedUser` @@ -291,7 +291,7 @@ Completely destroy the SuperDoc instance. superdoc.destroy(); ``` -## Event Methods +## Event methods ### `on` @@ -321,7 +321,7 @@ Unsubscribe from an event. superdoc.off('ready', handler); ``` -## Schema Introspection +## Schema introspection ### `getSchemaIntrospection` @@ -348,7 +348,7 @@ const schema = await getSchemaIntrospection({ mode: 'docx' }); -## TypeScript Types +## TypeScript types SuperDoc exports TypeScript interfaces for all node and mark types: diff --git a/apps/docs/core/supereditor/configuration.mdx b/apps/docs/core/supereditor/configuration.mdx index 8c7621ee64..5776292c85 100644 --- a/apps/docs/core/supereditor/configuration.mdx +++ b/apps/docs/core/supereditor/configuration.mdx @@ -5,7 +5,7 @@ keywords: "supereditor config, editor configuration, prosemirror setup, document SuperEditor configuration gives you low-level control over the DOCX engine. -## Quick Start +## Quick start ```javascript import "superdoc/style.css"; @@ -19,7 +19,7 @@ const editor = await Editor.open(docxFile, { `Editor.open()` is the recommended way to create an editor. It handles DOCX parsing, extension setup, and mounting automatically. -## Required Parameters +## Required parameters The document source. Can be a file path (Node.js), File/Blob (browser), or Buffer. @@ -65,7 +65,7 @@ const editor = await Editor.open(file, { -## Modes & Permissions +## Modes & permissions Editor rendering mode @@ -97,7 +97,7 @@ const editor = await Editor.open(file, { Whether the editor accepts input -## User & Collaboration +## User & collaboration Current user information @@ -127,7 +127,7 @@ const editor = await Editor.open(file, { Provider instance for collaboration sync -## Content Initialization +## Content initialization Initialize with HTML content (for `mode: 'html'`) @@ -155,7 +155,7 @@ const editor = await Editor.open(file, { Enable page-based layout -## Advanced Options +## Advanced options Run without mounting an editor view (Node.js/server-side processing). @@ -182,9 +182,9 @@ handleImageUpload: async (file) => { -## Configuration Patterns +## Configuration patterns -### Full DOCX Editor +### Full DOCX editor ```javascript import "superdoc/style.css"; @@ -197,7 +197,7 @@ const editor = await Editor.open(docxFile, { }); ``` -### Headless Converter (Node.js) +### Headless converter (Node.js) Convert DOCX files server-side without a browser using JSDOM. @@ -223,7 +223,7 @@ const markdown = await editor.getMarkdown(); editor.destroy(); ``` -### Headless Y.Doc to HTML (Collaboration) +### Headless Y.Doc to HTML (collaboration) Read content from a collaborative Y.Doc in your backend — useful for AI agents or APIs that need to access document content without a browser. @@ -248,7 +248,7 @@ const html = editor.getHTML(); editor.destroy(); ``` -### Custom Collaboration +### Custom collaboration ```javascript import { Editor } from "superdoc/super-editor"; @@ -268,7 +268,7 @@ const editor = await Editor.open(docxFile, { }); ``` -### Track Changes Mode +### Track changes mode ```javascript import { Editor } from "superdoc/super-editor"; diff --git a/apps/docs/core/supereditor/methods.mdx b/apps/docs/core/supereditor/methods.mdx index 29b21e4638..54ec62df9e 100644 --- a/apps/docs/core/supereditor/methods.mdx +++ b/apps/docs/core/supereditor/methods.mdx @@ -7,7 +7,7 @@ keywords: "supereditor methods, editor commands, document manipulation, editor a **Looking for programmatic document access?** The [Document API](/document-api/overview) is coming soon with a stable, engine-agnostic interface for querying and manipulating documents. -## Document Lifecycle +## Document lifecycle ### `open` @@ -175,7 +175,7 @@ const table = editor.getNodesOfType('table')[0]; editor.replaceNodeWithHTML(table, '...
'); ``` -## Editor Control +## Editor control ### `mount` / `unmount` @@ -261,7 +261,7 @@ editor.commands.insertContent('Plain text', { contentType: 'text' }); HTML and Markdown inline styles are stripped on import to ensure Word compatibility. -## Document Metadata +## Document metadata ### `getMetadata` @@ -295,7 +295,7 @@ Generate a summary of the document schema. Useful for AI agents that need to und const summary = await editor.getSchemaSummaryJSON(); ``` -## Position & Coordinates +## Position & coordinates ### `getElementAtPos` @@ -336,7 +336,7 @@ const attrs = editor.getAttributes('link'); console.log(attrs.href); ``` -## Page & Layout +## Page & layout ### `getPageStyles` diff --git a/apps/docs/core/supereditor/overview.mdx b/apps/docs/core/supereditor/overview.mdx index 7820801b02..31fc72bf56 100644 --- a/apps/docs/core/supereditor/overview.mdx +++ b/apps/docs/core/supereditor/overview.mdx @@ -22,7 +22,7 @@ SuperEditor is the core DOCX editing engine that powers SuperDoc. Use it directl - [Headless/server-side processing](/core/supereditor/configuration#headless-converter-nodejs) - Custom extension development -## Quick Start +## Quick start ```javascript import "superdoc/style.css"; @@ -38,7 +38,7 @@ const editor = await Editor.open(file, { }); ``` -## Key Initialization Steps +## Key initialization steps 1. **Import styles and the Editor class** 2. **Call `Editor.open()`** - Pass a file source and options. The editor handles parsing, extensions, and mounting automatically. From 98cc805a74c858d2fee2cd267cbdcc8df1c0775f Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 10:57:08 -0300 Subject: [PATCH 28/45] docs: sentence case headings in module pages --- .../modules/collaboration/configuration.mdx | 6 ++-- apps/docs/modules/collaboration/overview.mdx | 4 +-- .../docs/modules/collaboration/quickstart.mdx | 16 +++++------ apps/docs/modules/comments.mdx | 14 +++++----- apps/docs/modules/context-menu.mdx | 18 ++++++------ apps/docs/modules/overview.mdx | 2 +- apps/docs/modules/toolbar.mdx | 28 +++++++++---------- 7 files changed, 44 insertions(+), 44 deletions(-) diff --git a/apps/docs/modules/collaboration/configuration.mdx b/apps/docs/modules/collaboration/configuration.mdx index 539228b05b..0d025e01af 100644 --- a/apps/docs/modules/collaboration/configuration.mdx +++ b/apps/docs/modules/collaboration/configuration.mdx @@ -33,7 +33,7 @@ new SuperDoc({ Any Yjs-compatible provider -## User Configuration +## User configuration Current user information for presence/awareness @@ -57,7 +57,7 @@ colors: ["#FF6B6B", "#4ECDC4", "#45B7D1", "#96CEB4", "#FFEAA7"]; -## Media Upload +## Media upload Handle image uploads in collaborative documents: @@ -144,7 +144,7 @@ onLocked: ({ isLocked, lockedBy }) => { | `isLocked` | `boolean` | Whether the document is locked | | `lockedBy` | `Object` | User who locked the document | -## Provider Events +## Provider events Listen to provider events directly for connection status: diff --git a/apps/docs/modules/collaboration/overview.mdx b/apps/docs/modules/collaboration/overview.mdx index fede58ff24..0ba0ddd8f3 100644 --- a/apps/docs/modules/collaboration/overview.mdx +++ b/apps/docs/modules/collaboration/overview.mdx @@ -13,7 +13,7 @@ Enable multiple users to edit the same document simultaneously with real-time co style={{ zoom: 0.7, height: "510px" }} /> -## Choose Your Approach +## Choose your approach @@ -38,7 +38,7 @@ Enable multiple users to edit the same document simultaneously with real-time co -## Quick Start +## Quick start Get collaboration working in 5 minutes with Liveblocks: diff --git a/apps/docs/modules/collaboration/quickstart.mdx b/apps/docs/modules/collaboration/quickstart.mdx index 16e030e3d4..626f918a68 100644 --- a/apps/docs/modules/collaboration/quickstart.mdx +++ b/apps/docs/modules/collaboration/quickstart.mdx @@ -15,19 +15,19 @@ This guide uses Liveblocks because it's the fastest way to get started. See [all - SuperDoc installed in your project - A [Liveblocks account](https://liveblocks.io/) (free tier available) -## Step 1: Get Your API Key +## Step 1: Get your API key 1. Go to [liveblocks.io](https://liveblocks.io/) and create an account 2. Create a new project 3. Copy your **Public API Key** (starts with `pk_`) -## Step 2: Install Dependencies +## Step 2: Install dependencies ```bash npm install @liveblocks/client @liveblocks/yjs yjs ``` -## Step 3: Add the Code +## Step 3: Add the code @@ -185,7 +185,7 @@ npm install @liveblocks/client @liveblocks/yjs yjs -## Step 4: Test It! +## Step 4: Test it 1. Open your app in two browser windows 2. Start typing in one window @@ -195,7 +195,7 @@ npm install @liveblocks/client @liveblocks/yjs yjs You now have real-time collaboration working! -## What's Happening? +## What's happening? ```mermaid flowchart LR @@ -207,7 +207,7 @@ flowchart LR 2. **Yjs** manages the document state and conflict resolution 3. **SuperDoc** renders the editor and syncs with Yjs -## Adding User Presence +## Adding user presence Show who's currently editing: @@ -227,7 +227,7 @@ const superdoc = new SuperDoc({ }); ``` -## Environment Variables +## Environment variables For production, use environment variables: @@ -238,7 +238,7 @@ const client = createClient({ }); ``` -## Next Steps +## Next steps -## Viewing Mode Visibility +## Viewing mode visibility Comments are hidden by default when `documentMode` is `viewing`. Use the top-level `comments.visible` and `trackChanges.visible` flags to control what @@ -154,7 +154,7 @@ new SuperDoc({ }); ``` -## Setting Up the Comments UI +## Setting up the comments UI During initialization: @@ -174,7 +174,7 @@ superdoc.on("ready", () => { }); ``` -## Permission Resolver +## Permission resolver Customize who can resolve comments or accept tracked changes. The resolver receives the permission type, current user, and any tracked-change metadata. Return `false` to block the action. @@ -204,7 +204,7 @@ modules: { Module-level resolvers take precedence when both are defined. -## Word Import/Export +## Word import/export Word comments are automatically imported with the document and marked with `importedId`. When exporting, use the `commentsType` option: @@ -216,7 +216,7 @@ const blob = await superdoc.export({ commentsType: "external" }); const cleanBlob = await superdoc.export({ commentsType: "clean" }); ``` -## API Methods +## API methods These methods are available on the active editor's commands: @@ -366,7 +366,7 @@ onCommentsUpdate: ({ type, comment, meta }) => { } ``` -## Comment Data Structure +## Comment data structure diff --git a/apps/docs/modules/context-menu.mdx b/apps/docs/modules/context-menu.mdx index bdd879a4d3..0219a5518b 100644 --- a/apps/docs/modules/context-menu.mdx +++ b/apps/docs/modules/context-menu.mdx @@ -5,7 +5,7 @@ keywords: "context menu, slash menu, right-click menu, custom commands, slash co A contextual command menu triggered by typing `/` or right-clicking. Shows relevant actions based on cursor position and document state. -## Quick Start +## Quick start The context menu is **enabled by default**. Type `/` at the start of a paragraph or right-click anywhere in the document. @@ -62,7 +62,7 @@ The menu opens in two ways: After using the slash trigger, there's a 5-second cooldown before `/` triggers the menu again. During cooldown, `/` types normally. -## Default Items +## Default items Items shown depend on the trigger type and document context. @@ -74,7 +74,7 @@ Items shown depend on the trigger type and document context. | Edit table | `general` | Inside a table | | Paste | `clipboard` | Always | -### Right-Click Trigger +### Right-click trigger | Item | Section | Condition | |---|---|---| @@ -87,7 +87,7 @@ Items shown depend on the trigger type and document context. | Copy | `clipboard` | Text selected | | Paste | `clipboard` | Always | -## Custom Items +## Custom items Add custom items by defining sections in `customItems`. Each section has an `id` and an array of `items`. @@ -114,7 +114,7 @@ modules: { } ``` -### Item Properties +### Item properties Unique identifier for the item @@ -144,7 +144,7 @@ modules: { Custom render function for the menu item. Receives the context and should return an `HTMLElement`. -### Merging with Default Sections +### Merging with default sections If a custom section has the same `id` as a default section, the items are merged: @@ -166,7 +166,7 @@ modules: { } ``` -## Menu Provider +## Menu provider For full control over menu contents, use `menuProvider`. It receives the context and the computed sections array, and should return a new sections array. @@ -188,7 +188,7 @@ modules: { `menuProvider` runs after default items and `customItems` are merged. If it returns `null` or `undefined`, the original sections are used. -## Context Object +## Context object Both `showWhen` and `menuProvider` receive a context object with the current editor state: @@ -212,7 +212,7 @@ Both `showWhen` and `menuProvider` receive a context object with the current edi | `pos` | `number \| null` | Document position | | `node` | `Object \| null` | Node at cursor position | -## Keyboard Navigation +## Keyboard navigation When the menu is open: diff --git a/apps/docs/modules/overview.mdx b/apps/docs/modules/overview.mdx index cbe4ef476e..b17b7e8347 100644 --- a/apps/docs/modules/overview.mdx +++ b/apps/docs/modules/overview.mdx @@ -19,7 +19,7 @@ const superdoc = new SuperDoc({ }); ``` -## Available Modules +## Available modules diff --git a/apps/docs/modules/toolbar.mdx b/apps/docs/modules/toolbar.mdx index 72bc1f114f..eb654af6f6 100644 --- a/apps/docs/modules/toolbar.mdx +++ b/apps/docs/modules/toolbar.mdx @@ -5,7 +5,7 @@ keywords: "word toolbar, document formatting controls, custom toolbar, editor ui The toolbar provides a customizable UI for document editing with support for custom buttons, responsive layouts, and role-based controls. -## Quick Start +## Quick start ```javascript const superdoc = new SuperDoc({ @@ -67,11 +67,11 @@ const superdoc = new SuperDoc({ Custom button definitions. See [Custom Buttons](#custom-buttons). -## Available Buttons +## Available buttons Use button names with `excludeItems`, `groups`, and `icons` configuration. -### Text Formatting +### Text formatting Toggle bold (`Ctrl+B`) @@ -97,7 +97,7 @@ Use button names with `excludeItems`, `groups`, and `icons` configuration. Format painter — copy formatting from selection -### Font Controls +### Font controls Font family selector @@ -189,7 +189,7 @@ Use button names with `excludeItems`, `groups`, and `icons` configuration. Switch between editing/viewing/suggesting modes -### Track Changes +### Track changes Accept tracked change at current selection @@ -199,9 +199,9 @@ Use button names with `excludeItems`, `groups`, and `icons` configuration. Reject tracked change at current selection -## Custom Buttons +## Custom buttons -### Basic Button +### Basic button ```javascript modules: { @@ -244,7 +244,7 @@ modules: { Command name or handler function receiving `{ item, argument, option }` -### Dropdown Button +### Dropdown button ```javascript customButtons: [{ @@ -271,7 +271,7 @@ customButtons: [{ Show dropdown arrow -### Toggle Button +### Toggle button ```javascript customButtons: [{ @@ -297,7 +297,7 @@ customButtons: [{ Icon when active -## Icon Customization +## Icon customization ```javascript modules: { @@ -316,7 +316,7 @@ modules: { Icons should be 24x24 viewBox SVGs with `fill="currentColor"` for proper theming -## Font Configuration +## Font configuration @@ -344,7 +344,7 @@ fonts: [ ] ``` -## Responsive Behavior +## Responsive behavior The toolbar adapts at these widths: @@ -358,7 +358,7 @@ The toolbar adapts at these widths: Use `responsiveToContainer: true` to size based on the toolbar container instead of the window. -## Role-Based Controls +## Role-based controls The toolbar automatically adapts based on the user's role: @@ -368,7 +368,7 @@ The toolbar automatically adapts based on the user's role: | `suggester` | Track changes enabled, formatting available | | `editor` | Full access to all controls | -## API Methods +## API methods ```javascript const toolbar = superdoc.toolbar; From 64efd3dbf444e068264b8d96c6fbd73fa0942a58 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 10:57:28 -0300 Subject: [PATCH 29/45] chore: updatess --- apps/docs/core/supereditor/methods.mdx | 4 ---- apps/docs/core/supereditor/overview.mdx | 21 ++++----------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/apps/docs/core/supereditor/methods.mdx b/apps/docs/core/supereditor/methods.mdx index 54ec62df9e..e897045315 100644 --- a/apps/docs/core/supereditor/methods.mdx +++ b/apps/docs/core/supereditor/methods.mdx @@ -3,10 +3,6 @@ title: Methods keywords: "supereditor methods, editor commands, document manipulation, editor api" --- - -**Looking for programmatic document access?** The [Document API](/document-api/overview) is coming soon with a stable, engine-agnostic interface for querying and manipulating documents. - - ## Document lifecycle ### `open` diff --git a/apps/docs/core/supereditor/overview.mdx b/apps/docs/core/supereditor/overview.mdx index 31fc72bf56..4ecc631867 100644 --- a/apps/docs/core/supereditor/overview.mdx +++ b/apps/docs/core/supereditor/overview.mdx @@ -4,6 +4,10 @@ sidebarTitle: Overview keywords: "supereditor class, prosemirror docx, tiptap alternative, editor commands, document manipulation api" --- + +**Looking for programmatic document access?** The [Document API](/document-api/overview) is coming soon with a stable, engine-agnostic interface for querying and manipulating documents. + + SuperEditor is the core DOCX editing engine that powers SuperDoc. Use it directly when you need fine-grained control. ## When to use SuperEditor vs SuperDoc @@ -43,23 +47,6 @@ const editor = await Editor.open(file, { 1. **Import styles and the Editor class** 2. **Call `Editor.open()`** - Pass a file source and options. The editor handles parsing, extensions, and mounting automatically. -## Direct ProseMirror access - -SuperEditor gives you full ProseMirror access: - -```javascript -// Access ProseMirror directly -editor.view; // EditorView -editor.state; // EditorState -editor.schema; // Schema -editor.commands; // All commands - -// Do anything ProseMirror can do -editor.state.doc.forEach((node) => { - console.log(node.type.name); -}); -``` - ## Components The `SuperEditor` Vue component wraps the `Editor` class with reactive props and events. Use it in Vue apps for automatic lifecycle management. For other frameworks, use `Editor.open()` directly. From 96d5e7e00a18cc1c00f65b18ee4e7cbf832caf6b Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 10:59:06 -0300 Subject: [PATCH 30/45] docs: sentence case headings in solutions and document API pages --- apps/docs/document-api/overview.mdx | 12 ++++++------ apps/docs/solutions/esign/api-reference.mdx | 18 +++++++++--------- apps/docs/solutions/esign/backend.mdx | 8 ++++---- apps/docs/solutions/esign/introduction.mdx | 8 ++++---- apps/docs/solutions/overview.mdx | 4 ++-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/apps/docs/document-api/overview.mdx b/apps/docs/document-api/overview.mdx index a73a924e4d..80d64d0421 100644 --- a/apps/docs/document-api/overview.mdx +++ b/apps/docs/document-api/overview.mdx @@ -26,7 +26,7 @@ This works, but: - Requires understanding ProseMirror internals - Tightly coupled to the editor implementation -## What's Coming +## What's coming The Document API provides a stable, high-level interface: @@ -53,9 +53,9 @@ doc.replace(paragraphs[0], { text: 'New content' }); -## Feature Preview +## Feature preview -### Querying Content +### Querying content Find any content in your document: @@ -76,7 +76,7 @@ const signatures = doc.query({ }); ``` -### Making Changes +### Making changes Modify documents with a clean API: @@ -91,7 +91,7 @@ doc.insert(address, { type: 'paragraph', text: 'New paragraph' }); doc.delete(address); ``` -### Working with Tables +### Working with tables First-class table operations: @@ -117,7 +117,7 @@ doc.table(tableAddress).cell(1, 2).replace({ text: 'New value' }); -## Stay Updated +## Stay updated Join our Discord to get notified when Document API launches: diff --git a/apps/docs/solutions/esign/api-reference.mdx b/apps/docs/solutions/esign/api-reference.mdx index cbfa32470c..08a21d3464 100644 --- a/apps/docs/solutions/esign/api-reference.mdx +++ b/apps/docs/solutions/esign/api-reference.mdx @@ -4,9 +4,9 @@ title: API Reference Complete eSign component API -## Component Props +## Component props -### Required Props +### Required props Unique identifier for this signing session @@ -46,7 +46,7 @@ Complete eSign component API ``` -### Optional Props +### Optional props Field configuration @@ -261,7 +261,7 @@ interface SuperDocESignHandle { } ``` -## Ref Methods +## Ref methods Access via ref: @@ -293,9 +293,9 @@ return - `reset()` - Clear all state and start over - `updateFieldInDocument()` - Update a document field by id -## Field Components +## Field components -### Default Components +### Default components The component provides default implementations for all field types. You can import and extend them: @@ -311,7 +311,7 @@ import { SignatureInput, CheckboxInput } from '@superdoc-dev/esign'; /> ``` -### Custom Component Props +### Custom component props All custom field components receive: @@ -326,7 +326,7 @@ interface FieldComponentProps { } ``` -## CSS Classes +## CSS classes Target these classes for styling: @@ -337,7 +337,7 @@ Target these classes for styling: - `.superdoc-esign-actions` - Button container - `.superdoc-esign-btn` - Default buttons -## Import Types +## Import types All types are exported: diff --git a/apps/docs/solutions/esign/backend.mdx b/apps/docs/solutions/esign/backend.mdx index c588a55b7b..4fbb52ec02 100644 --- a/apps/docs/solutions/esign/backend.mdx +++ b/apps/docs/solutions/esign/backend.mdx @@ -14,7 +14,7 @@ Signing data 1. Annotate fields Stored 2. Apply signature ``` -## Complete Example +## Complete example @@ -155,7 +155,7 @@ def sign(): -## Download/PDF Generation +## Download/PDF generation Handle download requests to generate PDFs on-demand: @@ -218,7 +218,7 @@ def generate_pdf(): -## Data Structure +## Data structure The frontend sends the `onSubmit` payload plus a document reference and signer details your backend can access: @@ -251,7 +251,7 @@ The frontend sends the `onSubmit` payload plus a document reference and signer d } ``` -## API Reference +## API reference - [Authentication](/api-reference/authentication) - Get your API key - [Annotate endpoint](/api-reference/documents/annotate) - Fill fields diff --git a/apps/docs/solutions/esign/introduction.mdx b/apps/docs/solutions/esign/introduction.mdx index 522028e723..c7746a48c4 100644 --- a/apps/docs/solutions/esign/introduction.mdx +++ b/apps/docs/solutions/esign/introduction.mdx @@ -15,19 +15,19 @@ The eSign component wraps SuperDoc to provide a complete document acceptance wor ## Common use cases -### Terms of Service +### Terms of service Track that users scrolled through and accepted your terms. -### Employment Agreements +### Employment agreements Capture signatures on offer letters with personalized fields. -### Consent Forms +### Consent forms Manage multiple checkboxes for GDPR, medical, or marketing consent. -### Embedded Workflows +### Embedded workflows Add document signing to larger forms like onboarding flows. diff --git a/apps/docs/solutions/overview.mdx b/apps/docs/solutions/overview.mdx index 2d6eaa9098..c2b5d2936a 100644 --- a/apps/docs/solutions/overview.mdx +++ b/apps/docs/solutions/overview.mdx @@ -5,7 +5,7 @@ sidebarTitle: Overview SuperDoc Solutions are production-ready components that handle specific document workflows. They're built on SuperDoc but abstract away the complexity for common use cases. -## Available Solutions +## Available solutions ### SuperDoc eSign Complete document signing workflows with audit trails, field management, and compliance tracking. Perfect for terms of service, employment agreements, and consent forms. @@ -18,7 +18,7 @@ Create and manage document templates with structured fields using Word's SDT sys [Get started with Template Builder →](/solutions/template-builder/introduction) -## When to Use Solutions vs Core SuperDoc +## When to use solutions vs core SuperDoc | Use Case | Recommended | Why | |----------|------------|-----| From a257da3480af60743b4af36ed1f177f4df37c614 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:03:51 -0300 Subject: [PATCH 31/45] docs: sentence case headings in guide pages --- apps/docs/guides/collaboration/hocuspocus.mdx | 18 ++++---- apps/docs/guides/collaboration/liveblocks.mdx | 20 ++++----- .../collaboration/self-hosted-overview.mdx | 10 ++--- .../guides/collaboration/superdoc-yjs.mdx | 14 +++--- .../guides/collaboration/tiptap-cloud.mdx | 8 ++-- apps/docs/guides/collaboration/y-sweet.mdx | 16 +++---- apps/docs/guides/general/security.mdx | 18 ++++---- apps/docs/guides/general/storage.mdx | 12 ++--- .../guides/migration/breaking-changes-v1.mdx | 44 +++++++++---------- .../guides/migration/typescript-migration.mdx | 26 +++++------ 10 files changed, 93 insertions(+), 93 deletions(-) diff --git a/apps/docs/guides/collaboration/hocuspocus.mdx b/apps/docs/guides/collaboration/hocuspocus.mdx index 143db531f3..d801ecce43 100644 --- a/apps/docs/guides/collaboration/hocuspocus.mdx +++ b/apps/docs/guides/collaboration/hocuspocus.mdx @@ -85,7 +85,7 @@ provider.on("synced", () => { }); ``` -## React Example +## React example ```tsx import { useEffect, useRef, useState } from "react"; @@ -144,9 +144,9 @@ export default function Editor() { } ``` -## Server Configuration +## Server configuration -### Basic Options +### Basic options ```typescript Server.configure({ @@ -169,7 +169,7 @@ Server.configure({ | `onConnect` | Handle new connections | | `onDisconnect` | Handle disconnections | -### Persistence Example +### Persistence example ```typescript import { Server } from "@hocuspocus/server"; @@ -190,7 +190,7 @@ const server = Server.configure({ }); ``` -## Provider Options +## Provider options ```typescript const provider = new HocuspocusProvider({ @@ -209,7 +209,7 @@ const provider = new HocuspocusProvider({ ## Events -### Provider Events +### Provider events ```typescript // Sync status @@ -228,7 +228,7 @@ provider.on("authenticationFailed", ({ reason }) => { }); ``` -## Production Deployment +## Production deployment ### Docker @@ -245,7 +245,7 @@ EXPOSE 1234 CMD ["node", "server.js"] ``` -### With Redis (Scaling) +### With Redis (scaling) ```typescript import { Server } from "@hocuspocus/server"; @@ -281,7 +281,7 @@ Server.configure({ -## Next Steps +## Next steps { }); ``` -## Room Management +## Room management Each **room** represents a collaborative session. Use unique room IDs for different documents: @@ -69,7 +69,7 @@ const documentId = route.params.id; // e.g., 'contract-abc-123' const { room, leave } = client.enterRoom(documentId); ``` -### Room Naming Best Practices +### Room naming best practices ```javascript // Good: Unique, descriptive IDs @@ -82,9 +82,9 @@ client.enterRoom("document"); // Too generic client.enterRoom("test"); // May conflict with other users ``` -## User Presence +## User presence -### Showing Active Users +### Showing active users ```javascript const superdoc = new SuperDoc({ @@ -105,7 +105,7 @@ const superdoc = new SuperDoc({ }); ``` -### Custom User Colors +### Custom user colors ```javascript new SuperDoc({ @@ -164,7 +164,7 @@ Liveblocks automatically persists your Yjs document. Data is stored securely and with custom retention policies. -## Error Handling +## Error handling ```javascript const { room } = client.enterRoom("my-document"); @@ -235,7 +235,7 @@ useEffect(() => { -## Next Steps +## Next steps @@ -34,7 +34,7 @@ flowchart TB end ``` -## Choose Your Approach +## Choose your approach | Option | Best For | Setup Time | |--------|----------|------------| @@ -42,7 +42,7 @@ flowchart TB | [Hocuspocus](/guides/collaboration/hocuspocus) | TipTap ecosystem users | 30 mins | | [Y-Sweet](/guides/collaboration/y-sweet) | High performance, easy deployment | 30 mins | -## Quick Comparison +## Quick comparison @@ -90,7 +90,7 @@ flowchart TB -## Client Connection Options +## Client connection options When self-hosting, you have two ways to connect SuperDoc: @@ -151,7 +151,7 @@ The provider-agnostic approach gives you more control but requires managing the - Proper CORS configuration - Load balancer with sticky sessions (if scaling) -## Next Steps +## Next steps @@ -253,7 +253,7 @@ React to document changes (fires on every edit): -## Error Handling +## Error handling ```typescript const errorHandlers = { @@ -281,7 +281,7 @@ app.get('/doc/:documentId', { websocket: true }, async (socket, request) => { }); ``` -## Production Deployment +## Production deployment ### Docker @@ -298,7 +298,7 @@ EXPOSE 3050 CMD ["node", "server.js"] ``` -### Environment Variables +### Environment variables ```bash NODE_ENV=production @@ -307,7 +307,7 @@ JWT_SECRET=your-secret-key DATABASE_URL=postgres://user:pass@localhost/db ``` -### Health Check +### Health check ```typescript fastify.get('/health', (request, reply) => { @@ -367,7 +367,7 @@ fastify.get('/health', (request, reply) => { -## Next Steps +## Next steps { }); ``` -## React Example +## React example ```tsx import { useEffect, useRef, useState } from "react"; @@ -194,7 +194,7 @@ superdoc.destroy(); -## Next Steps +## Next steps { }); ``` -### 3. Client Setup +### 3. Client setup ```bash npm install @y-sweet/client yjs @@ -107,7 +107,7 @@ provider.on("sync", (synced) => { }); ``` -## React Example +## React example ```tsx import { useEffect, useRef, useState } from "react"; @@ -169,7 +169,7 @@ export default function Editor() { ## Configuration -### Environment Variables +### Environment variables **Auth Server:** @@ -210,7 +210,7 @@ provider.destroy(); superdoc.destroy(); ``` -## Production Deployment +## Production deployment ### Docker @@ -227,7 +227,7 @@ EXPOSE 3001 CMD ["node", "server.js"] ``` -### Running Y-Sweet in Production +### Running Y-Sweet in production For production, consider: @@ -254,7 +254,7 @@ For production, consider: -## Next Steps +## Next steps -## Best Practices +## Best practices diff --git a/apps/docs/guides/migration/breaking-changes-v1.mdx b/apps/docs/guides/migration/breaking-changes-v1.mdx index 2fa6cefd6b..81fd34d880 100644 --- a/apps/docs/guides/migration/breaking-changes-v1.mdx +++ b/apps/docs/guides/migration/breaking-changes-v1.mdx @@ -3,7 +3,7 @@ title: Breaking Changes v1.0.0 sidebarTitle: "Breaking Changes v1" --- -# SuperDoc v1.0.0 — Breaking Changes & Migration Guide +# SuperDoc v1.0.0 — Breaking changes & migration guide This document describes all **breaking changes** between SuperDoc `v0.x` and `v1.0.0`. It is intended for **customers upgrading to v1**. @@ -24,13 +24,13 @@ Most applications will require **explicit migration work**. --- -## 1. Version & Packaging +## 1. Version & packaging * **Version jump:** `0.35.3 → 1.0.0` * This release intentionally includes breaking API and behavior changes * v0 will continue to be supported as a "long term support" (LTS) line for some time -### Bundler Requirements (ESM) +### Bundler requirements (ESM) SuperDoc v1 introduces a new internal layout engine stack (packages under `@superdoc/*`). You do not need to install these directly—they are dependencies of `superdoc`. @@ -38,7 +38,7 @@ Bundlers must support ESM modules (or be configured to transpile ESM dependencie --- -## 2. Layout Engine Is Now Default (CRITICAL) +## 2. Layout engine is now default (CRITICAL) ```ts new SuperDoc(); // layout engine enabled by default @@ -54,15 +54,15 @@ Pagination is now handled entirely by the layout engine; use `layoutEngineOption --- -## 3. Pagination Extension Removed +## 3. Pagination extension removed The v0 `Pagination` extension was **removed**. If you were explicitly including it, remove it from your extensions list. --- -## 4. Lists Reimplemented (HIGH IMPACT) +## 4. Lists reimplemented (HIGH IMPACT) -### Removed Extensions +### Removed extensions * `BulletList` * `OrderedList` @@ -72,7 +72,7 @@ Lists are now modeled via paragraph properties (`paragraphProperties.numberingPr **Why this changed:** In Microsoft Word, lists are paragraph-level numbering properties (not separate list nodes). v1 adopts the same model so lists behave like Word and match DOCX semantics. -### Removed Commands +### Removed commands * `wrapInList` * `sinkListItem` @@ -80,7 +80,7 @@ Lists are now modeled via paragraph properties (`paragraphProperties.numberingPr * `splitListItem` * `deleteListItem` -### Replacement Commands +### Replacement commands ```ts editor.commands.toggleList('orderedList'); @@ -92,9 +92,9 @@ editor.commands.removeNumberingProperties(); --- -## 5. Paragraph Model Changes (HIGH IMPACT) +## 5. Paragraph model changes (HIGH IMPACT) -### Attribute Location Changed +### Attribute location changed Most paragraph formatting that previously lived on `node.attrs.*` is now under `node.attrs.paragraphProperties`, including: @@ -102,7 +102,7 @@ Most paragraph formatting that previously lived on `node.attrs.*` is now under ` * `tabStops`, `keepLines`, `keepNext` * `styleId` -### New Access Pattern +### New access pattern ```ts // v0 @@ -116,28 +116,28 @@ Paragraph layout is now computed by the layout engine. --- -## 6. Commands & Formatting Changes +## 6. Commands & formatting changes -### Removed Extensions +### Removed extensions * `TextIndent` * `LineHeight` -### Replacement Commands +### Replacement commands * Indent: `increaseTextIndent()`, `decreaseTextIndent()`, `setTextIndentation(points)`, `unsetTextIndentation()` * Line height: `setLineHeight(multiplier)`, `unsetLineHeight()` --- -## 7. TypeScript Support +## 7. TypeScript support * Core editor code migrated to TypeScript * Strongly typed commands, events, and schema No runtime behavior change, but imports may need updating. -## 8. CSS & Styling Removals +## 8. CSS & styling removals Removed: @@ -149,7 +149,7 @@ Rendering is now handled by the layout engine painter. --- -## 9. Ruler Placement Requires a Container +## 9. Ruler placement requires a container The ruler now teleports into a host element instead of always rendering inline. Pass a container selector/element via `rulerContainer` and enable it with `rulers: true`: @@ -164,7 +164,7 @@ new SuperDoc({ If no `rulerContainer` is provided, the ruler renders inline, but providing a dedicated container is the supported path going forward. -## 10. DOM Data Attributes for Lists Changed +## 10. DOM data attributes for lists changed In v0, list `
  • ` nodes emitted many `data-*` attributes (e.g., `data-num-id`, `data-level`, `data-indent`, `data-num-fmt`, `data-font-size`, `data-font-family`, `data-marker-type`, `data-list-level`). In v1, lists are paragraphs with numbering properties, and only these remain on list paragraphs: @@ -174,7 +174,7 @@ In v0, list `
  • ` nodes emitted many `data-*` attributes (e.g., `data-num-id`, All other numbering metadata now lives in `paragraphProperties.numberingProperties` (not in `data-*`). If you scraped DOM attributes for integrations or overlays, read the paragraph attributes/resolved properties instead. -## 11. Stored Document Migration (JSON & Yjs) +## 11. Stored document migration (JSON & Yjs) Persisted documents created on v0 need migration to load cleanly in v1 because schema and layout defaults changed. @@ -202,7 +202,7 @@ If you store ProseMirror JSON, run an export/import pipeline to re-hydrate with Using DOCX as the source of truth is the best way to perform this migration. The DOCX data structure is stable and using our import/export is the most reliable way to "upgrade" documents. -## 12. Migration Checklist +## 12. Migration checklist 1. Upgrade to `superdoc@^1.0.0` 2. Update TypeScript imports/types if you rely on editor typings @@ -212,7 +212,7 @@ Using DOCX as the source of truth is the best way to perform this migration. The --- -## Final Notes +## Final notes * **v1.0.0 is not a drop-in upgrade** * Most breaking changes are architectural and intentional diff --git a/apps/docs/guides/migration/typescript-migration.mdx b/apps/docs/guides/migration/typescript-migration.mdx index 83a16acf2b..779fdcb92d 100644 --- a/apps/docs/guides/migration/typescript-migration.mdx +++ b/apps/docs/guides/migration/typescript-migration.mdx @@ -3,11 +3,11 @@ title: TypeScript Migration Guide sidebarTitle: "TypeScript Migration" --- -# TypeScript Migration Guide +# TypeScript migration guide This guide covers the gradual migration of the SuperDoc monorepo from JavaScript to TypeScript. -## Quick Start +## Quick start **Infrastructure is ready.** You can now: @@ -19,7 +19,7 @@ This guide covers the gradual migration of the SuperDoc monorepo from JavaScript --- -## When to Migrate a File +## When to migrate a file Convert to TypeScript when: @@ -32,9 +32,9 @@ Convert to TypeScript when: --- -## How to Migrate +## How to migrate -### 1. Basic Function +### 1. Basic function **Before** (`helper.js`): @@ -52,7 +52,7 @@ export function formatDate(date: Date): string { } ``` -### 2. Vue Components +### 2. Vue components **Before**: @@ -109,7 +109,7 @@ function process(data: unknown) { --- -## Type Checking +## Type checking ### Package-specific (recommended) @@ -127,7 +127,7 @@ npm run type-check --- -## Common Issues +## Common issues ### Type errors in JavaScript files @@ -143,7 +143,7 @@ npm run clean:packages && npm run build --- -## Migration Priority +## Migration priority Suggested order: @@ -163,9 +163,9 @@ Suggested order: --- -## Advanced Patterns +## Advanced patterns -### ProseMirror Types +### ProseMirror types ```typescript import { Node as PMNode, Mark } from 'prosemirror-model'; @@ -176,7 +176,7 @@ export function updateNodeAttrs(node: PMNode, attrs: Record): PMNod } ``` -### Extension Pattern +### Extension pattern ```typescript import { Extension } from '@core/Extension'; @@ -198,7 +198,7 @@ export class MyExtension extends Extension { } ``` -### Discriminated Unions +### Discriminated unions ```typescript type CommandResult = { success: true; data: any } | { success: false; error: string }; From a7ee90bc06cac0affdf292426dd2bf9754ce7314 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:04:53 -0300 Subject: [PATCH 32/45] docs: sentence case headings in API reference pages --- apps/docs/api-reference/authentication.mdx | 2 +- apps/docs/api-reference/introduction.mdx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/docs/api-reference/authentication.mdx b/apps/docs/api-reference/authentication.mdx index c681173231..3aaa4e88d7 100644 --- a/apps/docs/api-reference/authentication.mdx +++ b/apps/docs/api-reference/authentication.mdx @@ -11,7 +11,7 @@ Authorization: Bearer sd_sk_abc123xyz789 [Get Your Key - Takes 2 minutes](/api-reference/quickstart) -## Production Setup +## Production setup Client-side JavaScript? Stop. Keys belong in environment variables. diff --git a/apps/docs/api-reference/introduction.mdx b/apps/docs/api-reference/introduction.mdx index eecdf0c626..e469bf2da6 100644 --- a/apps/docs/api-reference/introduction.mdx +++ b/apps/docs/api-reference/introduction.mdx @@ -8,7 +8,7 @@ Your documents are never persisted. Every API call is stateless—we process and Convert contracts to PDF. Add signatures to agreements. Merge quarterly reports. Everything preserves—tracked changes, complex tables, nested lists, headers. Real document operations via REST API. -## Why Stateless Matters +## Why stateless matters Enterprise documents contain sensitive data. NDAs, financial reports, legal contracts. SuperDoc's API processes them in memory and returns results immediately. No storage. No persistence. No risk. @@ -25,7 +25,7 @@ Bearer token in every request (except `/v1/health`): Authorization: Bearer sd_sk_abc123xyz789 ``` -## What's Working Now +## What's working now **Convert** - DOCX to PDF with perfect fidelity. That 50-page contract with tracked changes? Converts flawlessly. @@ -51,11 +51,11 @@ POST /v1/sign POST /v1/verify ``` -## What's Coming +## What's coming `/merge` - Combine documents with formatting intact.
    -## Built for Real Documents +## Built for real documents This isn't a wrapper around LibreOffice. We built custom document processing that handles: From 83f107235bc54c66658efa4e4aa47bc132c8b4f0 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:08:40 -0300 Subject: [PATCH 33/45] docs: rewrite security page to match brand voice Remove we/our framing, enterprise-grade buzzword, and long run-on sentences. Use you/your framing and short scannable prose. --- apps/docs/guides/general/security.mdx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/docs/guides/general/security.mdx b/apps/docs/guides/general/security.mdx index a831760f1c..be5af0e9b5 100644 --- a/apps/docs/guides/general/security.mdx +++ b/apps/docs/guides/general/security.mdx @@ -4,11 +4,11 @@ sidebarTitle: Security keywords: "SOC2, SOC 2, secure, security, bug bounty, trust, privacy policy, TOS, terms of service" --- -We utilize enterprise-grade best practices to protect our customers' data, and work with independent experts to verify our security, privacy, and compliance controls, and have achieved SOC 2 Type II compliance and reporting against stringent standards. Through an integration with Drata, we continually monitor hundreds of controls to maintain our security and GDPR compliance. +SuperDoc is SOC 2 Type II certified. Independent auditors verify security, privacy, and compliance controls. Drata monitors 100+ controls continuously for security and GDPR compliance. -**SuperDoc Editor (JS library)** is fully open source and self-hosted. Our team has zero access to sensitive document content. Documents are stored on our customers' own infrastructure. +**SuperDoc Editor (JS library)** is fully open source and self-hosted. Your documents stay on your infrastructure. The SuperDoc team has zero access to your content. -**SuperDoc APIs** are rigorously SOC2 certifed with no persistent document storage (data in, data out model). +**SuperDoc APIs** are SOC 2 certified with no persistent document storage (data in, data out). Date: Fri, 6 Feb 2026 11:10:54 -0300 Subject: [PATCH 34/45] docs: fix we/our framing, buzzwords, and missed headings Replace we/our with you/your or neutral phrasing across 9 files. Remove buzzwords (comprehensive, seamless). Fix missed Title Case headings and rename "What it is" to "What it does". --- apps/docs/ai/ai-actions/overview.mdx | 14 +++++++------- apps/docs/api-reference/introduction.mdx | 8 ++++---- apps/docs/api-reference/quickstart.mdx | 2 +- apps/docs/getting-started/introduction.mdx | 4 +--- apps/docs/guides/general/storage.mdx | 2 +- apps/docs/guides/migration/breaking-changes-v1.mdx | 2 +- apps/docs/resources/license.mdx | 10 +++++----- apps/docs/snippets/extensions/custom-selection.mdx | 6 +++--- apps/docs/solutions/esign/quickstart.mdx | 2 +- 9 files changed, 24 insertions(+), 26 deletions(-) diff --git a/apps/docs/ai/ai-actions/overview.mdx b/apps/docs/ai/ai-actions/overview.mdx index 3bf8c6c8cc..39d27d09e3 100644 --- a/apps/docs/ai/ai-actions/overview.mdx +++ b/apps/docs/ai/ai-actions/overview.mdx @@ -51,7 +51,7 @@ await ai.action.replace( Formatting results depend on the source DOCX styles; list indentation may vary and may require follow-up instructions. -## What it is +## What it does AI Actions is SuperDoc's **high-level AI offering**. It provides pre-built operations for common document automation tasks: @@ -107,11 +107,11 @@ try { Enable verbose logging by setting `enableLogging: true`. The package will emit parsing and traversal issues to `console.error`. -## Advanced Exports +## Advanced exports The package exports additional utilities for advanced use cases: -### Provider Factory +### Provider factory ```ts import { createAIProvider } from '@superdoc-dev/ai'; @@ -140,14 +140,14 @@ const ai = new AIActions(superdoc, { user, provider }); const result = await ai.planner.execute('Review the document and add comments to all legal terms'); ``` -### Service Classes +### Service classes For custom implementations, you can use the lower-level service classes: - **`AIActionsService`** - Core service class that provides AI-powered document actions - **`EditorAdapter`** - Adapter for SuperDoc editor operations, encapsulating editor-specific API calls -### Tool Utilities +### Tool utilities Utilities for working with AI tools: @@ -166,9 +166,9 @@ const myTool = { const isValid = isValidTool(myTool); ``` -### Type Exports +### Type exports -The package exports comprehensive TypeScript types including: +The package exports TypeScript types including: - `AIPlannerConfig`, `AIPlannerExecutionResult`, `AIPlan` - Planner types - `AIToolActions`, `SelectionRange`, `SelectionSnapshot` - Tool and selection types - `AIProviderInput`, `OpenAIProviderConfig`, `AnthropicProviderConfig`, `HttpProviderConfig` - Provider configuration types diff --git a/apps/docs/api-reference/introduction.mdx b/apps/docs/api-reference/introduction.mdx index e469bf2da6..245a0db1ca 100644 --- a/apps/docs/api-reference/introduction.mdx +++ b/apps/docs/api-reference/introduction.mdx @@ -1,10 +1,10 @@ --- -title: Meet our API +title: Meet the API sidebarTitle: Introduction keywords: "superdoc api, docx api reference, word editor api, document editor sdk, api documentation" --- -Your documents are never persisted. Every API call is stateless—we process and forget. That's the point. +Your documents are never persisted. Every API call is stateless — process and forget. That's the point. Convert contracts to PDF. Add signatures to agreements. Merge quarterly reports. Everything preserves—tracked changes, complex tables, nested lists, headers. Real document operations via REST API. @@ -57,7 +57,7 @@ POST /v1/verify ## Built for real documents -This isn't a wrapper around LibreOffice. We built custom document processing that handles: +This isn't a wrapper around LibreOffice. SuperDoc uses custom document processing that handles: - Tables spanning multiple pages - Tracked changes from multiple reviewers @@ -65,7 +65,7 @@ This isn't a wrapper around LibreOffice. We built custom document processing tha - Complex numbered lists and cross-references - Headers/footers with dynamic fields -Your Word documents work because we built for Word documents. Not markdown. Not HTML - Actual DOCX files. +Your Word documents work because SuperDoc was built for Word documents. Not markdown. Not HTML — actual DOCX files. ## Resources diff --git a/apps/docs/api-reference/quickstart.mdx b/apps/docs/api-reference/quickstart.mdx index 3b1482627a..46bd8d632d 100644 --- a/apps/docs/api-reference/quickstart.mdx +++ b/apps/docs/api-reference/quickstart.mdx @@ -17,7 +17,7 @@ Three minutes to your first response. ```bash curl "https://api.superdoc.dev/v1/auth/verify?email=you@email.com&code=123456" ``` - Save this key. We can't recover it. + Save this key. It can't be recovered. diff --git a/apps/docs/getting-started/introduction.mdx b/apps/docs/getting-started/introduction.mdx index 6cd11ff962..d0905f4f44 100644 --- a/apps/docs/getting-started/introduction.mdx +++ b/apps/docs/getting-started/introduction.mdx @@ -6,9 +6,7 @@ keywords: "docx editor, microsoft word web, word compatibility, document editing Your users need real Word documents. Not "Word-like." Not "compatible." Actual `.docx` files with tracked changes, complex tables, and section breaks that open perfectly in Microsoft Word. -That's what SuperDoc does. - -## What we built +## What SuperDoc does A JavaScript library that renders and edits Word documents in the browser. Comments, tracked changes, complex tables, headers/footers, real-time collaboration — every feature users actually rely on. Built for advanced documents like legal contracts and enterprise workflows. diff --git a/apps/docs/guides/general/storage.mdx b/apps/docs/guides/general/storage.mdx index cf055669c3..0e3f308f5b 100644 --- a/apps/docs/guides/general/storage.mdx +++ b/apps/docs/guides/general/storage.mdx @@ -71,7 +71,7 @@ When the document is requested later, look up the latest version in your databas The ways to export a document are covered in [Import/Export](/getting-started/import-export#export-options). -We recommend storing the [full DOCX binary](/getting-started/import-export#docx-export-full-fidelity) because it provides the highest fidelity version of the document. Other export options (such as [JSON](/getting-started/import-export#json-export-full-fidelity)) are also available. +Store the [full DOCX binary](/getting-started/import-export#docx-export-full-fidelity) for the highest fidelity version of the document. Other export options (such as [JSON](/getting-started/import-export#json-export-full-fidelity)) are also available. ## Best practices diff --git a/apps/docs/guides/migration/breaking-changes-v1.mdx b/apps/docs/guides/migration/breaking-changes-v1.mdx index 81fd34d880..17d6076593 100644 --- a/apps/docs/guides/migration/breaking-changes-v1.mdx +++ b/apps/docs/guides/migration/breaking-changes-v1.mdx @@ -186,7 +186,7 @@ Persisted documents created on v0 need migration to load cleanly in v1 because s - Import that DOCX with the v1 editor (headless/Node) to produce a new YDoc. 3. Validate the migrated doc. 4. Persist the migration flag in your metadata so it doesn’t rerun. -5. We recommend you keep a pre-migration snapshot for rollback. +5. Keep a pre-migration snapshot for rollback. 6. Store the migrated Yjs update ### Plain JSON docs (non-collab) diff --git a/apps/docs/resources/license.mdx b/apps/docs/resources/license.mdx index a0f106c650..8ce4e83d82 100644 --- a/apps/docs/resources/license.mdx +++ b/apps/docs/resources/license.mdx @@ -7,11 +7,11 @@ For questions about licensing, please contact [q@superdoc.dev](mailto:q@superdoc ## Contributing -We welcome contributions from the community! Here's how you can help: +Contributions are welcome. Here's how you can help: -1. Check our [issue tracker](https://github.com/Harbour-Enterprises/SuperDoc/issues) for open issues +1. Check the [issue tracker](https://github.com/Harbour-Enterprises/SuperDoc/issues) for open issues 2. Fork the repository and create a feature/bugfix branch -3. Write clear, documented code following our style guidelines -4. Submit a PR with detailed description of your changes +3. Write clear, documented code following the style guidelines +4. Submit a PR with a detailed description of your changes -See our [Contributing Guide](https://github.com/Harbour-Enterprises/SuperDoc/blob/main/CONTRIBUTING.md) for more details. +See the [Contributing Guide](https://github.com/Harbour-Enterprises/SuperDoc/blob/main/CONTRIBUTING.md) for more details. diff --git a/apps/docs/snippets/extensions/custom-selection.mdx b/apps/docs/snippets/extensions/custom-selection.mdx index a58957a6e7..6d655b7f72 100644 --- a/apps/docs/snippets/extensions/custom-selection.mdx +++ b/apps/docs/snippets/extensions/custom-selection.mdx @@ -1,6 +1,6 @@ Keep text selection visible when clicking toolbar buttons. -Select text and click the toolbar - your selection stays highlighted for a seamless editing experience. +Select text and click the toolbar — your selection stays highlighted. import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' @@ -49,10 +49,10 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ]} /> -## Use Case +## Use case - **Professional UX** - Selection doesn't disappear when using toolbars -- **Seamless editing** - Apply multiple formats without reselecting +- **Multi-format editing** - Apply multiple formats without reselecting - **User expectations** - Matches desktop word processor behavior ## Integration diff --git a/apps/docs/solutions/esign/quickstart.mdx b/apps/docs/solutions/esign/quickstart.mdx index 9d68d51e91..168823bdab 100644 --- a/apps/docs/solutions/esign/quickstart.mdx +++ b/apps/docs/solutions/esign/quickstart.mdx @@ -110,7 +110,7 @@ fields={{ ## Handling the response -The submit handler receives comprehensive data: +The submit handler receives: ```jsx const handleSubmit = async (data) => { From ac6648a4dc61311d192d570edd7b4e651d333f12 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:13:02 -0300 Subject: [PATCH 35/45] docs: sentence case headings in extensions and snippets Fix Source Code, Keyboard Shortcuts, Use Case, and other Title Case headings across 92 extension and snippet files. Also fix remaining we-framing in field-annotation and typescript-migration. --- apps/docs/ai/ai-actions/methods.mdx | 2 +- apps/docs/extensions/block-node.mdx | 2 +- apps/docs/extensions/bold.mdx | 4 ++-- apps/docs/extensions/bullet-list.mdx | 4 ++-- apps/docs/extensions/color.mdx | 2 +- apps/docs/extensions/content-block.mdx | 2 +- apps/docs/extensions/custom-selection.mdx | 2 +- apps/docs/extensions/document-section.mdx | 20 +++++++++---------- apps/docs/extensions/document.mdx | 2 +- apps/docs/extensions/dropcursor.mdx | 2 +- apps/docs/extensions/field-annotation.mdx | 2 +- apps/docs/extensions/font-family.mdx | 2 +- apps/docs/extensions/font-size.mdx | 2 +- apps/docs/extensions/format-commands.mdx | 4 ++-- apps/docs/extensions/gapcursor.mdx | 2 +- apps/docs/extensions/heading.mdx | 4 ++-- apps/docs/extensions/highlight.mdx | 4 ++-- apps/docs/extensions/history.mdx | 4 ++-- apps/docs/extensions/image.mdx | 2 +- apps/docs/extensions/italic.mdx | 4 ++-- apps/docs/extensions/line-break.mdx | 2 +- apps/docs/extensions/line-height.mdx | 2 +- apps/docs/extensions/link.mdx | 2 +- apps/docs/extensions/linked-styles.mdx | 2 +- apps/docs/extensions/list-item.mdx | 4 ++-- apps/docs/extensions/mention.mdx | 2 +- apps/docs/extensions/noderesizer.mdx | 2 +- apps/docs/extensions/ordered-list.mdx | 4 ++-- apps/docs/extensions/page-number.mdx | 4 ++-- apps/docs/extensions/paragraph.mdx | 2 +- apps/docs/extensions/placeholder.mdx | 2 +- apps/docs/extensions/popover-plugin.mdx | 2 +- apps/docs/extensions/run-item.mdx | 2 +- apps/docs/extensions/search.mdx | 2 +- apps/docs/extensions/shape-container.mdx | 2 +- apps/docs/extensions/shape-textbox.mdx | 2 +- apps/docs/extensions/slash-menu.mdx | 2 +- apps/docs/extensions/strike.mdx | 4 ++-- apps/docs/extensions/structured-content.mdx | 2 +- apps/docs/extensions/tab.mdx | 2 +- apps/docs/extensions/table-cell.mdx | 2 +- apps/docs/extensions/table-header.mdx | 2 +- apps/docs/extensions/table-row.mdx | 2 +- apps/docs/extensions/table.mdx | 4 ++-- apps/docs/extensions/text-align.mdx | 4 ++-- apps/docs/extensions/text-indent.mdx | 2 +- apps/docs/extensions/text-style.mdx | 2 +- apps/docs/extensions/text-transform.mdx | 2 +- apps/docs/extensions/underline.mdx | 4 ++-- .../guides/migration/typescript-migration.mdx | 2 +- apps/docs/snippets/extensions/block-node.mdx | 4 ++-- apps/docs/snippets/extensions/bold.mdx | 2 +- apps/docs/snippets/extensions/bookmarks.mdx | 2 +- apps/docs/snippets/extensions/bullet-list.mdx | 2 +- apps/docs/snippets/extensions/color.mdx | 2 +- .../snippets/extensions/content-block.mdx | 2 +- .../snippets/extensions/document-section.mdx | 2 +- apps/docs/snippets/extensions/dropcursor.mdx | 2 +- apps/docs/snippets/extensions/font-family.mdx | 2 +- apps/docs/snippets/extensions/font-size.mdx | 2 +- .../snippets/extensions/format-commands.mdx | 2 +- apps/docs/snippets/extensions/gapcursor.mdx | 6 +++--- apps/docs/snippets/extensions/heading.mdx | 2 +- apps/docs/snippets/extensions/highlight.mdx | 2 +- apps/docs/snippets/extensions/history.mdx | 2 +- apps/docs/snippets/extensions/image.mdx | 2 +- apps/docs/snippets/extensions/italic.mdx | 2 +- apps/docs/snippets/extensions/line-break.mdx | 2 +- apps/docs/snippets/extensions/line-height.mdx | 2 +- apps/docs/snippets/extensions/link.mdx | 2 +- .../snippets/extensions/linked-styles.mdx | 2 +- apps/docs/snippets/extensions/list-item.mdx | 16 +++++++-------- apps/docs/snippets/extensions/mention.mdx | 2 +- .../docs/snippets/extensions/node-resizer.mdx | 2 +- .../docs/snippets/extensions/ordered-list.mdx | 2 +- apps/docs/snippets/extensions/page-number.mdx | 2 +- apps/docs/snippets/extensions/paragraph.mdx | 2 +- apps/docs/snippets/extensions/placeholder.mdx | 2 +- .../snippets/extensions/popover-plugin.mdx | 2 +- apps/docs/snippets/extensions/run-item.mdx | 2 +- apps/docs/snippets/extensions/search.mdx | 2 +- .../snippets/extensions/shape-container.mdx | 2 +- .../snippets/extensions/shape-textbox.mdx | 2 +- apps/docs/snippets/extensions/slash-menu.mdx | 2 +- apps/docs/snippets/extensions/strike.mdx | 2 +- .../extensions/structured-content.mdx | 4 ++-- apps/docs/snippets/extensions/tab.mdx | 2 +- apps/docs/snippets/extensions/table.mdx | 2 +- apps/docs/snippets/extensions/text-align.mdx | 2 +- apps/docs/snippets/extensions/text-indent.mdx | 2 +- apps/docs/snippets/extensions/text-style.mdx | 2 +- .../snippets/extensions/text-transform.mdx | 2 +- apps/docs/snippets/extensions/underline.mdx | 2 +- 93 files changed, 127 insertions(+), 127 deletions(-) diff --git a/apps/docs/ai/ai-actions/methods.mdx b/apps/docs/ai/ai-actions/methods.mdx index 245a4164aa..3071afde8a 100644 --- a/apps/docs/ai/ai-actions/methods.mdx +++ b/apps/docs/ai/ai-actions/methods.mdx @@ -608,7 +608,7 @@ if (isValidTool(myTool)) { } ``` -## Advanced Exports +## Advanced exports For advanced use cases, the package exports additional classes and utilities: diff --git a/apps/docs/extensions/block-node.mdx b/apps/docs/extensions/block-node.mdx index 170dfd6437..2da5a9475a 100644 --- a/apps/docs/extensions/block-node.mdx +++ b/apps/docs/extensions/block-node.mdx @@ -187,7 +187,7 @@ Block node information object -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/bold.mdx b/apps/docs/extensions/bold.mdx index 333e3ee63e..2968dd1c98 100644 --- a/apps/docs/extensions/bold.mdx +++ b/apps/docs/extensions/bold.mdx @@ -24,7 +24,7 @@ Node attributes that can be set and retrieved: Bold weight value ('0' renders as normal) -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -32,7 +32,7 @@ Node attributes that can be set and retrieved: | toggleBold() | `⌘/Ctrl-B` | Toggle bold formatting (uppercase) | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/bullet-list.mdx b/apps/docs/extensions/bullet-list.mdx index 7cabcb11ae..d961c78e0d 100644 --- a/apps/docs/extensions/bullet-list.mdx +++ b/apps/docs/extensions/bullet-list.mdx @@ -68,14 +68,14 @@ Converts selected paragraphs to list items or removes list formatting editor.commands.toggleBulletList() ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| | toggleBulletList() | `⌘/Ctrl-Shift-8` | Toggle bullet list | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/color.mdx b/apps/docs/extensions/color.mdx index 6e6e61a65e..9fe416b684 100644 --- a/apps/docs/extensions/color.mdx +++ b/apps/docs/extensions/color.mdx @@ -68,7 +68,7 @@ editor.commands.unsetColor() Accepts hex colors (#ff0000), rgb(255,0,0), or named colors (red) -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/content-block.mdx b/apps/docs/extensions/content-block.mdx index 1d2128efd9..3d03b712fa 100644 --- a/apps/docs/extensions/content-block.mdx +++ b/apps/docs/extensions/content-block.mdx @@ -107,7 +107,7 @@ Content block configuration -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/custom-selection.mdx b/apps/docs/extensions/custom-selection.mdx index 19b5748656..b65016279d 100644 --- a/apps/docs/extensions/custom-selection.mdx +++ b/apps/docs/extensions/custom-selection.mdx @@ -49,7 +49,7 @@ Selection state -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/document-section.mdx b/apps/docs/extensions/document-section.mdx index 69287cdb5a..316160e540 100644 --- a/apps/docs/extensions/document-section.mdx +++ b/apps/docs/extensions/document-section.mdx @@ -29,7 +29,7 @@ DocumentSection.configure({ All commands available on `editor.commands`: -### Section Creation +### Section creation ```javascript editor.commands.createDocumentSection({ @@ -41,7 +41,7 @@ editor.commands.createDocumentSection({ }) ``` -### Section Manipulation +### Section manipulation ```javascript editor.commands.removeSectionAtSelection() @@ -54,7 +54,7 @@ editor.commands.updateSectionById({ }) ``` -## Helper Functions +## Helper functions @@ -114,7 +114,7 @@ editor.on('section:locked', ({ sectionId, locked }) => { ## Schema -### Node Definition +### Node definition ```javascript { @@ -152,7 +152,7 @@ editor.on('section:locked', ({ sectionId, locked }) => {
  • ``` -## Word Export +## Word export Sections export as Word content controls: @@ -169,9 +169,9 @@ Sections export as Word content controls: ``` -## Common Patterns +## Common patterns -### Contract Structure +### Contract structure ```javascript const contractSections = [ @@ -189,7 +189,7 @@ contractSections.forEach(section => { }); ``` -### Role-Based Locking +### Role-based locking ```javascript function applyRolePermissions(userRole) { @@ -207,7 +207,7 @@ function applyRolePermissions(userRole) { } ``` -### Section Templates +### Section templates ```javascript const templates = { @@ -233,7 +233,7 @@ function insertTemplate(templateId) { } ``` -### Conditional Content +### Conditional content ```javascript // Show/hide sections based on conditions diff --git a/apps/docs/extensions/document.mdx b/apps/docs/extensions/document.mdx index 5dee7ac4ac..932b91d5e0 100644 --- a/apps/docs/extensions/document.mdx +++ b/apps/docs/extensions/document.mdx @@ -41,7 +41,7 @@ editor.commands.clearDocument() ``` -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/dropcursor.mdx b/apps/docs/extensions/dropcursor.mdx index 4e473db844..127fa070cd 100644 --- a/apps/docs/extensions/dropcursor.mdx +++ b/apps/docs/extensions/dropcursor.mdx @@ -43,7 +43,7 @@ new SuperDoc({ ``` -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/field-annotation.mdx b/apps/docs/extensions/field-annotation.mdx index 05840ec3ec..78d0157f55 100644 --- a/apps/docs/extensions/field-annotation.mdx +++ b/apps/docs/extensions/field-annotation.mdx @@ -5,7 +5,7 @@ description: "Interactive form fields for documents. It can be used when variabl Available since v0.10.0 -Field Annotation use is not recommended because of its limited support for advanced document content (e.g., tables, advanced styling). We instead recommend using the more versatile [Structured Content Fields](/extensions/structured-content). +Field Annotation use is not recommended because of its limited support for advanced document content (e.g., tables, advanced styling). Use the more versatile [Structured Content Fields](/extensions/structured-content). ## Configuration diff --git a/apps/docs/extensions/font-family.mdx b/apps/docs/extensions/font-family.mdx index 46a2765785..49cb73ee7b 100644 --- a/apps/docs/extensions/font-family.mdx +++ b/apps/docs/extensions/font-family.mdx @@ -68,7 +68,7 @@ editor.commands.unsetFontFamily() CSS font-family string (e.g., 'Arial', 'Times New Roman', 'sans-serif') -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/font-size.mdx b/apps/docs/extensions/font-size.mdx index 3166eca56e..44a0eead4b 100644 --- a/apps/docs/extensions/font-size.mdx +++ b/apps/docs/extensions/font-size.mdx @@ -92,7 +92,7 @@ Font size configuration Size with optional unit (e.g., '12pt', '16px', 14) -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/format-commands.mdx b/apps/docs/extensions/format-commands.mdx index 273830b320..70df5a69b7 100644 --- a/apps/docs/extensions/format-commands.mdx +++ b/apps/docs/extensions/format-commands.mdx @@ -66,7 +66,7 @@ Works like format painter - first click copies, second click applies editor.commands.copyFormat() ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -88,7 +88,7 @@ Stored format style -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/gapcursor.mdx b/apps/docs/extensions/gapcursor.mdx index fba8ad58cd..3f9b77e418 100644 --- a/apps/docs/extensions/gapcursor.mdx +++ b/apps/docs/extensions/gapcursor.mdx @@ -9,7 +9,7 @@ import Description from '/snippets/extensions/gapcursor.mdx' -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/heading.mdx b/apps/docs/extensions/heading.mdx index b450910f10..1fdba0d804 100644 --- a/apps/docs/extensions/heading.mdx +++ b/apps/docs/extensions/heading.mdx @@ -67,7 +67,7 @@ editor.commands.toggleHeading({ level: 3 }) Heading attributes including level
    -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -79,7 +79,7 @@ editor.commands.toggleHeading({ level: 3 }) | toggleHeading() | `⌘/Ctrl-Alt-6` | Toggle heading level 6 | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/highlight.mdx b/apps/docs/extensions/highlight.mdx index 2932ea699e..4e9651650e 100644 --- a/apps/docs/extensions/highlight.mdx +++ b/apps/docs/extensions/highlight.mdx @@ -63,14 +63,14 @@ Toggle highlight formatting editor.commands.toggleHighlight() ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| | toggleHighlight() | `⌘/Ctrl-Shift-h` | Toggle highlighted formatting | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/history.mdx b/apps/docs/extensions/history.mdx index b518ac60e5..fa702d88dd 100644 --- a/apps/docs/extensions/history.mdx +++ b/apps/docs/extensions/history.mdx @@ -50,7 +50,7 @@ Only available after an undo action editor.commands.redo() ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -59,7 +59,7 @@ editor.commands.redo() | redo() | `⌘/Ctrl-y` | Redo last action (alternative) | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/image.mdx b/apps/docs/extensions/image.mdx index 6deb90ef53..a05ffde9e9 100644 --- a/apps/docs/extensions/image.mdx +++ b/apps/docs/extensions/image.mdx @@ -185,7 +185,7 @@ Options for inserting an image -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/italic.mdx b/apps/docs/extensions/italic.mdx index 32190997f9..96960dc855 100644 --- a/apps/docs/extensions/italic.mdx +++ b/apps/docs/extensions/italic.mdx @@ -16,7 +16,7 @@ Configure the extension behavior: HTML attributes for italic elements
    -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -24,7 +24,7 @@ Configure the extension behavior: | toggleItalic() | `⌘/Ctrl-I` | Toggle italic formatting (uppercase) | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/line-break.mdx b/apps/docs/extensions/line-break.mdx index caa56e5703..0cd41cf5ed 100644 --- a/apps/docs/extensions/line-break.mdx +++ b/apps/docs/extensions/line-break.mdx @@ -39,7 +39,7 @@ editor.commands.insertPageBreak() ``` -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/line-height.mdx b/apps/docs/extensions/line-height.mdx index 3963f345ae..d51ec9d960 100644 --- a/apps/docs/extensions/line-height.mdx +++ b/apps/docs/extensions/line-height.mdx @@ -77,7 +77,7 @@ editor.commands.unsetLineHeight() Line height as number (1.5) or string with unit ('1.5em', '24px') -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/link.mdx b/apps/docs/extensions/link.mdx index dd6273c931..bbc360ceef 100644 --- a/apps/docs/extensions/link.mdx +++ b/apps/docs/extensions/link.mdx @@ -153,7 +153,7 @@ Link options for setLink command -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/linked-styles.mdx b/apps/docs/extensions/linked-styles.mdx index 66b1da1336..b3f87d84ad 100644 --- a/apps/docs/extensions/linked-styles.mdx +++ b/apps/docs/extensions/linked-styles.mdx @@ -186,7 +186,7 @@ Style definition from Word document -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/list-item.mdx b/apps/docs/extensions/list-item.mdx index 165dd1e5ad..e44b6a1bfe 100644 --- a/apps/docs/extensions/list-item.mdx +++ b/apps/docs/extensions/list-item.mdx @@ -227,7 +227,7 @@ const headingStyle = editor.helpers.linkedStyles.getStyleById('Heading1'); The style object or undefined
    -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -288,7 +288,7 @@ Selection state -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/mention.mdx b/apps/docs/extensions/mention.mdx index baedc18f8a..ce381c511c 100644 --- a/apps/docs/extensions/mention.mdx +++ b/apps/docs/extensions/mention.mdx @@ -29,7 +29,7 @@ Node attributes that can be set and retrieved: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/noderesizer.mdx b/apps/docs/extensions/noderesizer.mdx index aeb1cca115..f72148b68b 100644 --- a/apps/docs/extensions/noderesizer.mdx +++ b/apps/docs/extensions/noderesizer.mdx @@ -9,7 +9,7 @@ import Description from '/snippets/extensions/node-resizer.mdx' -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/ordered-list.mdx b/apps/docs/extensions/ordered-list.mdx index 6d9d635564..273f0734f2 100644 --- a/apps/docs/extensions/ordered-list.mdx +++ b/apps/docs/extensions/ordered-list.mdx @@ -113,14 +113,14 @@ Cycles through decimal -> lowerAlpha -> lowerRoman based on depth editor.commands.updateOrderedListStyleType() ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| | toggleOrderedList() | `⌘/Ctrl-Shift-7` | Toggle ordered list | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/page-number.mdx b/apps/docs/extensions/page-number.mdx index 8ce942dd30..8d3d0ffaa5 100644 --- a/apps/docs/extensions/page-number.mdx +++ b/apps/docs/extensions/page-number.mdx @@ -50,14 +50,14 @@ editor.commands.addTotalPageCount() **Returns:** `Function` Command function -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| | addAutoPageNumber() | `⌘/Ctrl-Shift-alt-p` | Insert page number | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/paragraph.mdx b/apps/docs/extensions/paragraph.mdx index c218faf9eb..b4b939e2a3 100644 --- a/apps/docs/extensions/paragraph.mdx +++ b/apps/docs/extensions/paragraph.mdx @@ -61,7 +61,7 @@ Node attributes that can be set and retrieved: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/placeholder.mdx b/apps/docs/extensions/placeholder.mdx index 75c7fe9bc7..ec1308f4e6 100644 --- a/apps/docs/extensions/placeholder.mdx +++ b/apps/docs/extensions/placeholder.mdx @@ -17,7 +17,7 @@ Configure the extension behavior: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/popover-plugin.mdx b/apps/docs/extensions/popover-plugin.mdx index 522ed898fb..5906a3f2c7 100644 --- a/apps/docs/extensions/popover-plugin.mdx +++ b/apps/docs/extensions/popover-plugin.mdx @@ -9,7 +9,7 @@ import Description from '/snippets/extensions/popover-plugin.mdx' -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/run-item.mdx b/apps/docs/extensions/run-item.mdx index 35b090bc30..4d36aa03bf 100644 --- a/apps/docs/extensions/run-item.mdx +++ b/apps/docs/extensions/run-item.mdx @@ -9,7 +9,7 @@ import Description from '/snippets/extensions/run-item.mdx' -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/search.mdx b/apps/docs/extensions/search.mdx index fc33c6c8d9..d65716f536 100644 --- a/apps/docs/extensions/search.mdx +++ b/apps/docs/extensions/search.mdx @@ -88,7 +88,7 @@ Search match object -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/shape-container.mdx b/apps/docs/extensions/shape-container.mdx index 6eecaffb57..0fc2931e0c 100644 --- a/apps/docs/extensions/shape-container.mdx +++ b/apps/docs/extensions/shape-container.mdx @@ -29,7 +29,7 @@ Node attributes that can be set and retrieved: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/shape-textbox.mdx b/apps/docs/extensions/shape-textbox.mdx index 46f3735443..44bdfd5ee4 100644 --- a/apps/docs/extensions/shape-textbox.mdx +++ b/apps/docs/extensions/shape-textbox.mdx @@ -17,7 +17,7 @@ Configure the extension behavior: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/slash-menu.mdx b/apps/docs/extensions/slash-menu.mdx index d2a5e377d7..699da0a653 100644 --- a/apps/docs/extensions/slash-menu.mdx +++ b/apps/docs/extensions/slash-menu.mdx @@ -9,7 +9,7 @@ import Description from '/snippets/extensions/slash-menu.mdx' -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/strike.mdx b/apps/docs/extensions/strike.mdx index a96e16f10e..1d028296fa 100644 --- a/apps/docs/extensions/strike.mdx +++ b/apps/docs/extensions/strike.mdx @@ -48,14 +48,14 @@ Toggle strikethrough formatting editor.commands.toggleStrike() ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| | toggleStrike() | `⌘/Ctrl-Shift-s` | Toggle strikethrough formatting | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/structured-content.mdx b/apps/docs/extensions/structured-content.mdx index 75efffe852..613df17216 100644 --- a/apps/docs/extensions/structured-content.mdx +++ b/apps/docs/extensions/structured-content.mdx @@ -295,7 +295,7 @@ if (field.length) console.log("Found field:", field[0].node.attrs);
    -## Source Code +## Source code import { SourceCodeLink } from "/snippets/components/source-code-link.jsx"; diff --git a/apps/docs/extensions/tab.mdx b/apps/docs/extensions/tab.mdx index 5c627839a9..ed32f57d3d 100644 --- a/apps/docs/extensions/tab.mdx +++ b/apps/docs/extensions/tab.mdx @@ -25,7 +25,7 @@ Node attributes that can be set and retrieved: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/table-cell.mdx b/apps/docs/extensions/table-cell.mdx index ebad8692a4..d8f8d8906d 100644 --- a/apps/docs/extensions/table-cell.mdx +++ b/apps/docs/extensions/table-cell.mdx @@ -115,7 +115,7 @@ Cell background configuration -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/table-header.mdx b/apps/docs/extensions/table-header.mdx index b8f2557f85..08a20de16c 100644 --- a/apps/docs/extensions/table-header.mdx +++ b/apps/docs/extensions/table-header.mdx @@ -33,7 +33,7 @@ Node attributes that can be set and retrieved: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/table-row.mdx b/apps/docs/extensions/table-row.mdx index 7b525e8478..d1c85fc77b 100644 --- a/apps/docs/extensions/table-row.mdx +++ b/apps/docs/extensions/table-row.mdx @@ -133,7 +133,7 @@ applied to the last row of the parent object. -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/table.mdx b/apps/docs/extensions/table.mdx index 5fb4a54df8..43767992a3 100644 --- a/apps/docs/extensions/table.mdx +++ b/apps/docs/extensions/table.mdx @@ -384,7 +384,7 @@ editor.commands.deleteCellAndTableBorders() **Returns:** `Function` Command -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -825,7 +825,7 @@ Border creation options -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/text-align.mdx b/apps/docs/extensions/text-align.mdx index 4f36e19ad3..d4896da0c8 100644 --- a/apps/docs/extensions/text-align.mdx +++ b/apps/docs/extensions/text-align.mdx @@ -69,7 +69,7 @@ Resets alignment to the default value editor.commands.unsetTextAlign() ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -79,7 +79,7 @@ editor.commands.unsetTextAlign() | setTextAlign('justify')() | `⌘/Ctrl-Shift-j` | Justify text | -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/text-indent.mdx b/apps/docs/extensions/text-indent.mdx index 6f45a82139..a70a6e2773 100644 --- a/apps/docs/extensions/text-indent.mdx +++ b/apps/docs/extensions/text-indent.mdx @@ -113,7 +113,7 @@ editor.commands.decreaseTextIndent() **Returns:** `Function` Command function -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/text-style.mdx b/apps/docs/extensions/text-style.mdx index f5c93d23c5..f79c882f3f 100644 --- a/apps/docs/extensions/text-style.mdx +++ b/apps/docs/extensions/text-style.mdx @@ -60,7 +60,7 @@ editor.commands.removeEmptyTextStyle() -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/text-transform.mdx b/apps/docs/extensions/text-transform.mdx index 95bf25cf8c..54e00711fe 100644 --- a/apps/docs/extensions/text-transform.mdx +++ b/apps/docs/extensions/text-transform.mdx @@ -25,7 +25,7 @@ Node attributes that can be set and retrieved: -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/underline.mdx b/apps/docs/extensions/underline.mdx index 48ed29cd39..d774b1cee3 100644 --- a/apps/docs/extensions/underline.mdx +++ b/apps/docs/extensions/underline.mdx @@ -62,7 +62,7 @@ editor.commands.toggleUnderline() **Returns:** `Function` Command -## Keyboard Shortcuts +## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| @@ -82,7 +82,7 @@ Underline style configuration -## Source Code +## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/guides/migration/typescript-migration.mdx b/apps/docs/guides/migration/typescript-migration.mdx index 779fdcb92d..371b1c3300 100644 --- a/apps/docs/guides/migration/typescript-migration.mdx +++ b/apps/docs/guides/migration/typescript-migration.mdx @@ -131,7 +131,7 @@ npm run type-check ### Type errors in JavaScript files -Ensure `checkJs: false` in your tsconfig. We only type-check `.ts` files during migration. +Ensure `checkJs: false` in your tsconfig. Only `.ts` files are type-checked during migration. ### Build fails after migrating a file diff --git a/apps/docs/snippets/extensions/block-node.mdx b/apps/docs/snippets/extensions/block-node.mdx index 909c97560a..8c899c12ce 100644 --- a/apps/docs/snippets/extensions/block-node.mdx +++ b/apps/docs/snippets/extensions/block-node.mdx @@ -115,7 +115,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ]} /> -## How It Works +## How it works Every block-level node (paragraphs, headings, etc.) automatically receives a unique `sdBlockId` attribute. This enables: @@ -124,7 +124,7 @@ Every block-level node (paragraphs, headings, etc.) automatically receives a uni 3. **Collaborative editing** - Reference blocks consistently across clients 4. **Programmatic updates** - Update document structure via APIs -## Use Case +## Use case - **Document APIs** - Build REST APIs that manipulate specific blocks - **Collaboration** - Track who edited which blocks in real-time diff --git a/apps/docs/snippets/extensions/bold.mdx b/apps/docs/snippets/extensions/bold.mdx index e7e4df68e0..1bf5c7524c 100644 --- a/apps/docs/snippets/extensions/bold.mdx +++ b/apps/docs/snippets/extensions/bold.mdx @@ -48,7 +48,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Headings** - Visual hierarchy without changing size - **Key terms** - Highlight important concepts diff --git a/apps/docs/snippets/extensions/bookmarks.mdx b/apps/docs/snippets/extensions/bookmarks.mdx index 16f3e84ba4..0149a81bbe 100644 --- a/apps/docs/snippets/extensions/bookmarks.mdx +++ b/apps/docs/snippets/extensions/bookmarks.mdx @@ -77,7 +77,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Table of Contents** - Create clickable TOC entries that jump to chapters - **Cross-References** - Link to figures, tables, or sections elsewhere diff --git a/apps/docs/snippets/extensions/bullet-list.mdx b/apps/docs/snippets/extensions/bullet-list.mdx index 2349310340..c3ab4c7427 100644 --- a/apps/docs/snippets/extensions/bullet-list.mdx +++ b/apps/docs/snippets/extensions/bullet-list.mdx @@ -97,7 +97,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Action items** - Track tasks and responsibilities - **Feature lists** - Showcase product capabilities diff --git a/apps/docs/snippets/extensions/color.mdx b/apps/docs/snippets/extensions/color.mdx index 8cf4665fda..88f51219f5 100644 --- a/apps/docs/snippets/extensions/color.mdx +++ b/apps/docs/snippets/extensions/color.mdx @@ -93,7 +93,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Status indicators** - Red for errors, green for success, yellow for warnings - **Document sections** - Color-code different types of content diff --git a/apps/docs/snippets/extensions/content-block.mdx b/apps/docs/snippets/extensions/content-block.mdx index 1c4aa59e6c..4a1f9892b6 100644 --- a/apps/docs/snippets/extensions/content-block.mdx +++ b/apps/docs/snippets/extensions/content-block.mdx @@ -92,7 +92,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Section Breaks** - Visually separate different parts of your document - **Horizontal Rules** - Classic divider between content sections diff --git a/apps/docs/snippets/extensions/document-section.mdx b/apps/docs/snippets/extensions/document-section.mdx index 607f2ca4dc..b53dbe89ce 100644 --- a/apps/docs/snippets/extensions/document-section.mdx +++ b/apps/docs/snippets/extensions/document-section.mdx @@ -61,7 +61,7 @@ people will never forget how you made them feel."

    Maya Angelou ``` -## Use Case +## Use case - Contract management - Lock legal clauses, leave business terms editable - Multi-team documents - Each team owns their section diff --git a/apps/docs/snippets/extensions/dropcursor.mdx b/apps/docs/snippets/extensions/dropcursor.mdx index 7976724fdd..f4dfd28b15 100644 --- a/apps/docs/snippets/extensions/dropcursor.mdx +++ b/apps/docs/snippets/extensions/dropcursor.mdx @@ -32,7 +32,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' height="250px" /> -## Use Case +## Use case - **Visual Feedback** - Shows exactly where content will drop - **Precision Placement** - Position images and files accurately diff --git a/apps/docs/snippets/extensions/font-family.mdx b/apps/docs/snippets/extensions/font-family.mdx index 09b10a3ce5..c4fa9c1d50 100644 --- a/apps/docs/snippets/extensions/font-family.mdx +++ b/apps/docs/snippets/extensions/font-family.mdx @@ -69,7 +69,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Brand consistency** - Match company typography guidelines - **Document hierarchy** - Different fonts for headers vs body text diff --git a/apps/docs/snippets/extensions/font-size.mdx b/apps/docs/snippets/extensions/font-size.mdx index f8fb827674..c3a7034bce 100644 --- a/apps/docs/snippets/extensions/font-size.mdx +++ b/apps/docs/snippets/extensions/font-size.mdx @@ -77,7 +77,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Visual hierarchy** - Different sizes for headers, body, and footnotes - **Emphasis** - Larger text draws attention without bold diff --git a/apps/docs/snippets/extensions/format-commands.mdx b/apps/docs/snippets/extensions/format-commands.mdx index addb3eba16..5692993c4f 100644 --- a/apps/docs/snippets/extensions/format-commands.mdx +++ b/apps/docs/snippets/extensions/format-commands.mdx @@ -44,7 +44,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' 3. Select target text 4. Click Format Painter again to apply -## Use Case +## Use case - **Consistency** - Apply the same styling across multiple sections - **Speed** - Faster than manually applying multiple formats diff --git a/apps/docs/snippets/extensions/gapcursor.mdx b/apps/docs/snippets/extensions/gapcursor.mdx index 69ec9971b3..cfd947855a 100644 --- a/apps/docs/snippets/extensions/gapcursor.mdx +++ b/apps/docs/snippets/extensions/gapcursor.mdx @@ -28,7 +28,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' **How to see it:** Use arrow keys to navigate to the edges of tables or around block elements. The gap cursor appears as a thin horizontal line where normal cursors can't go. -## When Gap Cursor Appears +## When gap cursor appears The gap cursor activates at positions that are: - **Before/after tables** - Add content outside table boundaries @@ -37,7 +37,7 @@ The gap cursor activates at positions that are: - **Between void blocks** - Navigate between non-editable elements - **Document boundaries** - Start/end of document near block elements -## Visual Appearance +## Visual appearance ``` Normal cursor (vertical): Gap cursor (horizontal): @@ -47,7 +47,7 @@ Normal cursor (vertical): Gap cursor (horizontal): More text ━━━━━━━━━━━━ ``` -## Use Case +## Use case - **Table Navigation** - Add content before/after tables without complex workarounds - **Image Positioning** - Insert text around images and media diff --git a/apps/docs/snippets/extensions/heading.mdx b/apps/docs/snippets/extensions/heading.mdx index 82510514e5..87268fd91b 100644 --- a/apps/docs/snippets/extensions/heading.mdx +++ b/apps/docs/snippets/extensions/heading.mdx @@ -87,7 +87,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Document structure** - Create logical hierarchy and navigation - **Accessibility** - Screen readers use headings for navigation diff --git a/apps/docs/snippets/extensions/highlight.mdx b/apps/docs/snippets/extensions/highlight.mdx index 2c5355a265..0eb96f4da4 100644 --- a/apps/docs/snippets/extensions/highlight.mdx +++ b/apps/docs/snippets/extensions/highlight.mdx @@ -72,7 +72,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Document review** - Color-code feedback - **Study notes** - Highlight key concepts diff --git a/apps/docs/snippets/extensions/history.mdx b/apps/docs/snippets/extensions/history.mdx index a9940861df..b068cf29ad 100644 --- a/apps/docs/snippets/extensions/history.mdx +++ b/apps/docs/snippets/extensions/history.mdx @@ -38,7 +38,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' - **Deep history** - Stores up to 100 undo steps by default - **Smart tracking** - Preserves selection and cursor position -## Use Case +## Use case - **Mistake recovery** - Quickly undo accidental deletions or changes - **Experimentation** - Try different edits knowing you can revert diff --git a/apps/docs/snippets/extensions/image.mdx b/apps/docs/snippets/extensions/image.mdx index 529e2f1178..2e1539aff2 100644 --- a/apps/docs/snippets/extensions/image.mdx +++ b/apps/docs/snippets/extensions/image.mdx @@ -70,7 +70,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Document illustrations** - Add diagrams, charts, and screenshots - **Product documentation** - Include product images and UI screenshots diff --git a/apps/docs/snippets/extensions/italic.mdx b/apps/docs/snippets/extensions/italic.mdx index c51084c83a..0cb2fe1a62 100644 --- a/apps/docs/snippets/extensions/italic.mdx +++ b/apps/docs/snippets/extensions/italic.mdx @@ -51,7 +51,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Emphasis** - Softer than bold - **Foreign words** - *Lorem ipsum*, *c'est la vie* diff --git a/apps/docs/snippets/extensions/line-break.mdx b/apps/docs/snippets/extensions/line-break.mdx index b169249c1d..c102da2cf1 100644 --- a/apps/docs/snippets/extensions/line-break.mdx +++ b/apps/docs/snippets/extensions/line-break.mdx @@ -39,7 +39,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' - **Line Break** - Moves to next line within same paragraph (Shift+Enter) - **Page Break** - Forces content to start on new page when printing -## Use Case +## Use case - **Address formatting** - Multiple lines without paragraph spacing - **Poetry/verses** - Maintain line structure without gaps diff --git a/apps/docs/snippets/extensions/line-height.mdx b/apps/docs/snippets/extensions/line-height.mdx index 5b6f248459..46ba2db711 100644 --- a/apps/docs/snippets/extensions/line-height.mdx +++ b/apps/docs/snippets/extensions/line-height.mdx @@ -57,7 +57,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ]} /> -## Use Case +## Use case - **Readability** - Increase spacing for easier reading - **Academic requirements** - Double spacing for papers and theses diff --git a/apps/docs/snippets/extensions/link.mdx b/apps/docs/snippets/extensions/link.mdx index 1509466f43..260c845cc2 100644 --- a/apps/docs/snippets/extensions/link.mdx +++ b/apps/docs/snippets/extensions/link.mdx @@ -56,7 +56,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **External links** - Connect to websites and online resources - **Document navigation** - Create internal anchor links diff --git a/apps/docs/snippets/extensions/linked-styles.mdx b/apps/docs/snippets/extensions/linked-styles.mdx index 957f692b4b..ad738643bb 100644 --- a/apps/docs/snippets/extensions/linked-styles.mdx +++ b/apps/docs/snippets/extensions/linked-styles.mdx @@ -120,7 +120,7 @@ editor.commands.setLinkedStyle(titleStyle) ``` -## Use Case +## Use case - **Document Templates** - Maintain corporate style guides - **Consistency** - Uniform formatting across large documents diff --git a/apps/docs/snippets/extensions/list-item.mdx b/apps/docs/snippets/extensions/list-item.mdx index e5e44151a1..c8928b42d8 100644 --- a/apps/docs/snippets/extensions/list-item.mdx +++ b/apps/docs/snippets/extensions/list-item.mdx @@ -62,16 +62,16 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ]} /> -## Key Features +## Key features -### Custom Node View +### Custom node view The list item uses a custom node view that provides: - **Visual numbering/bullets** - Rendered separately from content - **Smart indentation** - Calculates proper spacing based on Word styles - **Font inheritance** - Respects document and paragraph styles - **Marker alignment** - Handles left, right, and centered numbering -### Word Compatibility Attributes +### Word compatibility attributes The list item maintains numerous Word-specific attributes: - `numId` - Links to Word numbering definition @@ -97,7 +97,7 @@ The list item maintains numerous Word-specific attributes: ``` -## Keyboard Shortcuts +## Keyboard shortcuts | Action | Shortcut | Description | |--------|----------|-------------| @@ -107,22 +107,22 @@ The list item maintains numerous Word-specific attributes: | Outdent | `Shift+Tab` | Decreases nesting level | | Exit List | `Enter` twice | Creates a paragraph after the list | -## Numbering Formats +## Numbering formats -### Standard Formats +### Standard formats - **Decimal** - 1, 2, 3, 4... - **Lower Alpha** - a, b, c, d... - **Upper Alpha** - A, B, C, D... - **Lower Roman** - i, ii, iii, iv... - **Upper Roman** - I, II, III, IV... -### Custom Formats +### Custom formats Word supports complex numbering like: - **Legal** - 1.1, 1.2, 1.2.1, 1.2.2... - **Outline** - I.A.1.a.i... - **Custom** - Chapter 1, Section A, Article i... -## Use Case +## Use case - **Document Structure** - Organize content hierarchically - **Instructions** - Step-by-step procedures diff --git a/apps/docs/snippets/extensions/mention.mdx b/apps/docs/snippets/extensions/mention.mdx index bb873d3f08..aa2b3b20eb 100644 --- a/apps/docs/snippets/extensions/mention.mdx +++ b/apps/docs/snippets/extensions/mention.mdx @@ -28,7 +28,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ]} /> -## Use Case +## Use case - **Document reviews** - Tag reviewers and approvers - **Collaboration** - Notify specific team members diff --git a/apps/docs/snippets/extensions/node-resizer.mdx b/apps/docs/snippets/extensions/node-resizer.mdx index 1d8bfdc9c5..de8f8962dc 100644 --- a/apps/docs/snippets/extensions/node-resizer.mdx +++ b/apps/docs/snippets/extensions/node-resizer.mdx @@ -11,7 +11,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' height="400px" /> -## Use Case +## Use case - **Image sizing** - Adjust images to fit layout - **Maintain quality** - Aspect ratio preservation diff --git a/apps/docs/snippets/extensions/ordered-list.mdx b/apps/docs/snippets/extensions/ordered-list.mdx index 5e54ba3cec..69f6a4f564 100644 --- a/apps/docs/snippets/extensions/ordered-list.mdx +++ b/apps/docs/snippets/extensions/ordered-list.mdx @@ -57,7 +57,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Instructions** - Step-by-step procedures - **Legal documents** - Numbered clauses and sections diff --git a/apps/docs/snippets/extensions/page-number.mdx b/apps/docs/snippets/extensions/page-number.mdx index d08f3acee0..8ba1aea230 100644 --- a/apps/docs/snippets/extensions/page-number.mdx +++ b/apps/docs/snippets/extensions/page-number.mdx @@ -51,7 +51,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Professional documents** - Standard page numbering - **Reports** - Page X of Y format diff --git a/apps/docs/snippets/extensions/paragraph.mdx b/apps/docs/snippets/extensions/paragraph.mdx index 9cac8ac0a4..0b61b3468a 100644 --- a/apps/docs/snippets/extensions/paragraph.mdx +++ b/apps/docs/snippets/extensions/paragraph.mdx @@ -29,7 +29,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Document structure** - Basic building blocks of content - **Formatting control** - Spacing, alignment, indentation diff --git a/apps/docs/snippets/extensions/placeholder.mdx b/apps/docs/snippets/extensions/placeholder.mdx index 3d1b529b03..c801dcdd38 100644 --- a/apps/docs/snippets/extensions/placeholder.mdx +++ b/apps/docs/snippets/extensions/placeholder.mdx @@ -9,7 +9,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' height="150px" /> -## Use Case +## Use case - **User guidance** - Prompt what content to add - **Form fields** - Indicate expected input diff --git a/apps/docs/snippets/extensions/popover-plugin.mdx b/apps/docs/snippets/extensions/popover-plugin.mdx index 978f43d6c2..624c53c44d 100644 --- a/apps/docs/snippets/extensions/popover-plugin.mdx +++ b/apps/docs/snippets/extensions/popover-plugin.mdx @@ -11,7 +11,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' height="200px" /> -## Use Case +## Use case - **User mentions** - Select from user list - **Autocomplete** - Smart suggestions as you type diff --git a/apps/docs/snippets/extensions/run-item.mdx b/apps/docs/snippets/extensions/run-item.mdx index baf99426be..d2b754ad8b 100644 --- a/apps/docs/snippets/extensions/run-item.mdx +++ b/apps/docs/snippets/extensions/run-item.mdx @@ -20,7 +20,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Word import** - Preserve exact run structure - **Format boundaries** - Maintain formatting breaks diff --git a/apps/docs/snippets/extensions/search.mdx b/apps/docs/snippets/extensions/search.mdx index 91854ae9cf..3eb441e78b 100644 --- a/apps/docs/snippets/extensions/search.mdx +++ b/apps/docs/snippets/extensions/search.mdx @@ -48,7 +48,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' /> -## Use Case +## Use case - Find and replace: quickly locate words or phrases and replace them. - Content navigation: jump to the next or previous match without scrolling manually. diff --git a/apps/docs/snippets/extensions/shape-container.mdx b/apps/docs/snippets/extensions/shape-container.mdx index b93152fe86..ed5e1143a2 100644 --- a/apps/docs/snippets/extensions/shape-container.mdx +++ b/apps/docs/snippets/extensions/shape-container.mdx @@ -31,7 +31,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Callout boxes** - Highlight important information - **Diagrams** - Preserve complex Word drawings diff --git a/apps/docs/snippets/extensions/shape-textbox.mdx b/apps/docs/snippets/extensions/shape-textbox.mdx index eccdfef670..cd434e227f 100644 --- a/apps/docs/snippets/extensions/shape-textbox.mdx +++ b/apps/docs/snippets/extensions/shape-textbox.mdx @@ -24,7 +24,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Sidebars** - Additional information alongside main text - **Callouts** - Highlight key points diff --git a/apps/docs/snippets/extensions/slash-menu.mdx b/apps/docs/snippets/extensions/slash-menu.mdx index cba30cc77d..19c3b3fb0d 100644 --- a/apps/docs/snippets/extensions/slash-menu.mdx +++ b/apps/docs/snippets/extensions/slash-menu.mdx @@ -11,7 +11,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' height="200px" /> -## Use Case +## Use case - **Quick inserts** - Fast access to blocks and formatting - **Discoverability** - Users learn available features diff --git a/apps/docs/snippets/extensions/strike.mdx b/apps/docs/snippets/extensions/strike.mdx index 795dc60140..715134ed56 100644 --- a/apps/docs/snippets/extensions/strike.mdx +++ b/apps/docs/snippets/extensions/strike.mdx @@ -51,7 +51,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Price changes** - Show original vs sale price - **Task lists** - Mark completed items diff --git a/apps/docs/snippets/extensions/structured-content.mdx b/apps/docs/snippets/extensions/structured-content.mdx index 8f7ea93ab6..3ec575f151 100644 --- a/apps/docs/snippets/extensions/structured-content.mdx +++ b/apps/docs/snippets/extensions/structured-content.mdx @@ -1,6 +1,6 @@ Native Word SDT (w:sdt) fields for documents. Supports inline and block structured content tags for dynamic templates with full Word compatibility. -## Use Case +## Use case - Form templates - Create fillable documents with inline text fields and block content areas - Contract generation - Dynamic clauses and terms that map to Word content controls @@ -78,7 +78,7 @@ people will never forget how you made them feel."

    Maya Angelou -## Quick Start +## Quick start ```javascript // Insert inline field for customer name diff --git a/apps/docs/snippets/extensions/tab.mdx b/apps/docs/snippets/extensions/tab.mdx index 4e1b895176..94686c972c 100644 --- a/apps/docs/snippets/extensions/tab.mdx +++ b/apps/docs/snippets/extensions/tab.mdx @@ -34,7 +34,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Lists without bullets** - Align text in columns - **Forms** - Create fill-in areas with dot leaders diff --git a/apps/docs/snippets/extensions/table.mdx b/apps/docs/snippets/extensions/table.mdx index 9a18797669..5ce67a47f7 100644 --- a/apps/docs/snippets/extensions/table.mdx +++ b/apps/docs/snippets/extensions/table.mdx @@ -111,7 +111,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Financial reports** - Quarterly data with totals - **Comparison matrices** - Feature/pricing tables diff --git a/apps/docs/snippets/extensions/text-align.mdx b/apps/docs/snippets/extensions/text-align.mdx index ca3aaca094..35102999d9 100644 --- a/apps/docs/snippets/extensions/text-align.mdx +++ b/apps/docs/snippets/extensions/text-align.mdx @@ -66,7 +66,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Titles & Headings** - Center important headings for emphasis - **Quotes** - Right-align attributions or center block quotes diff --git a/apps/docs/snippets/extensions/text-indent.mdx b/apps/docs/snippets/extensions/text-indent.mdx index b85a56ad17..648d83715a 100644 --- a/apps/docs/snippets/extensions/text-indent.mdx +++ b/apps/docs/snippets/extensions/text-indent.mdx @@ -67,7 +67,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Academic Papers** - MLA/APA format requires 0.5" first-line indents - **Books & Novels** - Standard typography for fiction and non-fiction diff --git a/apps/docs/snippets/extensions/text-style.mdx b/apps/docs/snippets/extensions/text-style.mdx index a70e39abcb..738c2c2e5b 100644 --- a/apps/docs/snippets/extensions/text-style.mdx +++ b/apps/docs/snippets/extensions/text-style.mdx @@ -69,7 +69,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Style Foundation** - Base layer for combining multiple text properties - **Clean Markup** - Prevents empty span elements in your HTML diff --git a/apps/docs/snippets/extensions/text-transform.mdx b/apps/docs/snippets/extensions/text-transform.mdx index f9fe5716a3..3d62289d51 100644 --- a/apps/docs/snippets/extensions/text-transform.mdx +++ b/apps/docs/snippets/extensions/text-transform.mdx @@ -57,7 +57,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Headings** - Consistent uppercase styling without CAPS LOCK - **Acronyms** - Ensure abbreviations display correctly diff --git a/apps/docs/snippets/extensions/underline.mdx b/apps/docs/snippets/extensions/underline.mdx index 6cbef7d52b..d0b7274089 100644 --- a/apps/docs/snippets/extensions/underline.mdx +++ b/apps/docs/snippets/extensions/underline.mdx @@ -51,7 +51,7 @@ import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx' ``` -## Use Case +## Use case - **Legal documents** - Emphasize terms and conditions - **Forms** - Indicate fill-in areas: _____________ From 6bfa55d28b1894aeaa18d03ed167cd4e8506b36e Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:16:34 -0300 Subject: [PATCH 36/45] docs: remove remaining our/we framing across all pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace our → the, remove we recommend patterns. Zero instances of we/our remain in any doc page. --- apps/docs/ai/ai-builder/overview.mdx | 2 +- apps/docs/document-api/overview.mdx | 2 +- apps/docs/guides/collaboration/hocuspocus.mdx | 2 +- apps/docs/guides/collaboration/self-hosted-overview.mdx | 4 ++-- apps/docs/guides/collaboration/superdoc-yjs.mdx | 2 +- apps/docs/guides/general/security.mdx | 2 +- apps/docs/guides/general/storage.mdx | 2 +- apps/docs/guides/migration/breaking-changes-v1.mdx | 2 +- apps/docs/modules/collaboration/overview.mdx | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/docs/ai/ai-builder/overview.mdx b/apps/docs/ai/ai-builder/overview.mdx index f7333223b7..9681924252 100644 --- a/apps/docs/ai/ai-builder/overview.mdx +++ b/apps/docs/ai/ai-builder/overview.mdx @@ -23,4 +23,4 @@ See the [AI Actions Quick Start](/ai/ai-actions/overview#quick-start) to get sta ## Get notified -Want to be notified when AI Builder launches? [Join our Discord](https://discord.com/invite/b9UuaZRyaB) or [watch on GitHub](https://github.com/Harbour-Enterprises/SuperDoc). +Want to be notified when AI Builder launches? [Join Discord](https://discord.com/invite/b9UuaZRyaB) or [watch on GitHub](https://github.com/Harbour-Enterprises/SuperDoc). diff --git a/apps/docs/document-api/overview.mdx b/apps/docs/document-api/overview.mdx index 80d64d0421..f786ba50d4 100644 --- a/apps/docs/document-api/overview.mdx +++ b/apps/docs/document-api/overview.mdx @@ -119,7 +119,7 @@ doc.table(tableAddress).cell(1, 2).replace({ text: 'New value' }); ## Stay updated -Join our Discord to get notified when Document API launches: +Join Discord to get notified when Document API launches: Get early access and share feedback diff --git a/apps/docs/guides/collaboration/hocuspocus.mdx b/apps/docs/guides/collaboration/hocuspocus.mdx index d801ecce43..b5530a1bda 100644 --- a/apps/docs/guides/collaboration/hocuspocus.mdx +++ b/apps/docs/guides/collaboration/hocuspocus.mdx @@ -289,7 +289,7 @@ Server.configure({ icon="rocket" href="/guides/collaboration/superdoc-yjs" > - Try our official collaboration package + Try the official collaboration package - **Our official collaboration package** + **The official collaboration package** - Purpose-built for SuperDoc - Builder pattern API @@ -159,7 +159,7 @@ The provider-agnostic approach gives you more control but requires managing the icon="rocket" href="/guides/collaboration/superdoc-yjs" > - Recommended - our official package + Recommended - the official package diff --git a/apps/docs/guides/migration/breaking-changes-v1.mdx b/apps/docs/guides/migration/breaking-changes-v1.mdx index 17d6076593..d89118a1d7 100644 --- a/apps/docs/guides/migration/breaking-changes-v1.mdx +++ b/apps/docs/guides/migration/breaking-changes-v1.mdx @@ -200,7 +200,7 @@ If you store ProseMirror JSON, run an export/import pipeline to re-hydrate with ### Why DOCX export/import? -Using DOCX as the source of truth is the best way to perform this migration. The DOCX data structure is stable and using our import/export is the most reliable way to "upgrade" documents. +Using DOCX as the source of truth is the best way to perform this migration. The DOCX data structure is stable and the import/export pipeline is the most reliable way to "upgrade" documents. ## 12. Migration checklist diff --git a/apps/docs/modules/collaboration/overview.mdx b/apps/docs/modules/collaboration/overview.mdx index 0ba0ddd8f3..d29bba4903 100644 --- a/apps/docs/modules/collaboration/overview.mdx +++ b/apps/docs/modules/collaboration/overview.mdx @@ -31,7 +31,7 @@ Enable multiple users to edit the same document simultaneously with real-time co | Option | Best For | |--------|----------| - | [SuperDoc Yjs](/guides/collaboration/superdoc-yjs) | Recommended — our official package | + | [SuperDoc Yjs](/guides/collaboration/superdoc-yjs) | Recommended — the official package | | [Hocuspocus](/guides/collaboration/hocuspocus) | TipTap ecosystem users | | [Y-Sweet](/guides/collaboration/y-sweet) | High performance, easy deployment | From c1deec84e9085ca47e7e3d65a0748cfca262aa72 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:25:09 -0300 Subject: [PATCH 37/45] chore: remove scan script --- scripts/docs/scan-coverage.ts | 398 ---------------------------------- 1 file changed, 398 deletions(-) delete mode 100644 scripts/docs/scan-coverage.ts diff --git a/scripts/docs/scan-coverage.ts b/scripts/docs/scan-coverage.ts deleted file mode 100644 index f73036e889..0000000000 --- a/scripts/docs/scan-coverage.ts +++ /dev/null @@ -1,398 +0,0 @@ -#!/usr/bin/env bun -/** - * Documentation Coverage Scanner - * - * Scans super-editor exports and compares against MDX documentation files. - * Generates a coverage report showing documented vs undocumented exports. - * Filters out exports marked with @internal JSDoc tags. - * - * Usage: bun scripts/docs/scan-coverage.ts - */ - -import { readFileSync, readdirSync, existsSync } from 'fs'; -import { join, basename } from 'path'; - -const ROOT = join(import.meta.dir, '../..'); -const SUPER_EDITOR_SRC = join(ROOT, 'packages/super-editor/src'); -const DOCS_DIR = join(ROOT, 'apps/docs'); - -interface ExportInfo { - name: string; - source: string; - type: 'extension' | 'class' | 'helper' | 'component' | 'other'; - hasDoc: boolean; - isInternal: boolean; -} - -interface CoverageReport { - total: number; - internal: number; - public: number; - documented: number; - undocumented: number; - percentage: number; - exports: ExportInfo[]; -} - -/** - * Parse export statements from a JavaScript file, detecting @internal tags - */ -function parseExports(filePath: string): { name: string; isInternal: boolean }[] { - const content = readFileSync(filePath, 'utf-8'); - const results: { name: string; isInternal: boolean }[] = []; - - // Parse export blocks: export { ... } - // We need line-by-line analysis to detect /** @internal */ comments - const lines = content.split('\n'); - let inExportBlock = false; - let nextIsInternal = false; - - for (const line of lines) { - const trimmed = line.trim(); - - if (trimmed.startsWith('export {') || trimmed.startsWith('export{')) { - inExportBlock = true; - // Check if single-line export - if (trimmed.includes('}')) { - const names = trimmed - .replace(/export\s*\{/, '') - .replace(/\}.*/, '') - .split(',') - .map((s) => - s - .trim() - .split(/\s+as\s+/)[0] - .trim(), - ) - .filter((s) => s && !s.startsWith('//') && !s.startsWith('/**')); - for (const name of names) { - results.push({ name, isInternal: false }); - } - inExportBlock = false; - } - continue; - } - - if (inExportBlock) { - if (trimmed === '}' || trimmed === '};') { - inExportBlock = false; - nextIsInternal = false; - continue; - } - - // Detect @internal comment - if (trimmed.includes('@internal')) { - nextIsInternal = true; - continue; - } - - // Skip pure comments - if (trimmed.startsWith('//') || trimmed.startsWith('/**') || trimmed.startsWith('*')) { - continue; - } - - // Extract export name - const name = trimmed - .replace(/,\s*$/, '') - .split(/\s+as\s+/)[0] - .trim(); - if (name && name !== '') { - results.push({ name, isInternal: nextIsInternal }); - nextIsInternal = false; - } - } - } - - // Also match: export const Name = ... - let match; - const exportConstRegex = /export\s+const\s+(\w+)/g; - while ((match = exportConstRegex.exec(content)) !== null) { - if (!results.find((r) => r.name === match![1])) { - results.push({ name: match[1], isInternal: false }); - } - } - - // Match: export function Name(... - const exportFuncRegex = /export\s+function\s+(\w+)/g; - while ((match = exportFuncRegex.exec(content)) !== null) { - if (!results.find((r) => r.name === match![1])) { - results.push({ name: match[1], isInternal: false }); - } - } - - // Match: export class Name - const exportClassRegex = /export\s+class\s+(\w+)/g; - while ((match = exportClassRegex.exec(content)) !== null) { - if (!results.find((r) => r.name === match![1])) { - results.push({ name: match[1], isInternal: false }); - } - } - - // Dedupe by name (keep first occurrence) - const seen = new Set(); - return results.filter((r) => { - if (seen.has(r.name)) return false; - seen.add(r.name); - return true; - }); -} - -/** - * Recursively get all MDX files from a directory - */ -function getMdxFiles(dir: string): string[] { - if (!existsSync(dir)) return []; - const results: string[] = []; - for (const entry of readdirSync(dir, { withFileTypes: true })) { - const fullPath = join(dir, entry.name); - if (entry.isDirectory()) { - results.push(...getMdxFiles(fullPath)); - } else if (entry.name.endsWith('.mdx')) { - results.push(fullPath); - } - } - return results; -} - -/** - * Get all documented exports from MDX files across all docs directories - */ -function getDocumentedExports(): Set { - const documented = new Set(); - - const mdxFiles = getMdxFiles(DOCS_DIR); - for (const filePath of mdxFiles) { - // Add filename as a documented name (e.g., "bold.mdx" → "bold") - const name = basename(filePath, '.mdx'); - documented.add(name.toLowerCase()); - - const content = readFileSync(filePath, 'utf-8'); - - // Match frontmatter title and keywords - const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/); - if (frontmatterMatch) { - const fm = frontmatterMatch[1]; - const titleMatch = fm.match(/title:\s*(.+)/); - if (titleMatch) { - for (const word of titleMatch[1].replace(/["']/g, '').split(/\s+/)) { - if (word.length > 1) documented.add(word.toLowerCase()); - } - } - const kwMatch = fm.match(/keywords:\s*"([^"]+)"/); - if (kwMatch) { - for (const kw of kwMatch[1].split(',')) { - for (const word of kw.trim().split(/\s+/)) { - if (word.length > 1) documented.add(word.toLowerCase()); - } - } - } - } - - // Match backtick-quoted identifiers: `SuperConverter`, `Editor`, etc. - for (const match of content.matchAll(/`(\w+)`/g)) { - documented.add(match[1].toLowerCase()); - } - - // Match import statements: import { X, Y } from 'superdoc' - for (const match of content.matchAll(/import\s*\{([^}]+)\}/g)) { - const names = match[1].split(',').map((s) => - s - .trim() - .split(/\s+as\s+/)[0] - .trim(), - ); - for (const n of names) { - if (n) documented.add(n.toLowerCase()); - } - } - - // Match destructuring: const { X, Y } = helpers - for (const match of content.matchAll(/const\s*\{([^}]+)\}/g)) { - const names = match[1].split(',').map((s) => s.trim().split(/\s*:/)[0].trim()); - for (const n of names) { - if (n) documented.add(n.toLowerCase()); - } - } - } - - return documented; -} - -/** - * Categorize an export based on naming conventions - */ -function categorizeExport(name: string): ExportInfo['type'] { - const lowerName = name.toLowerCase(); - - if (lowerName.includes('helper')) return 'helper'; - if (lowerName.includes('editor') || lowerName.includes('converter')) return 'class'; - if ( - lowerName.endsWith('vue') || - ['SuperEditor', 'Toolbar', 'SlashMenu', 'AIWriter', 'SuperInput', 'BasicUpload'].includes(name) - ) - return 'component'; - if ( - name[0] === name[0].toUpperCase() && - !name.includes('_') && - ![ - 'Extensions', - 'Plugin', - 'PluginKey', - 'Decoration', - 'DecorationSet', - 'TrackChangesBasePluginKey', - 'CommentsPluginKey', - ].includes(name) - ) { - return 'extension'; - } - - return 'other'; -} - -/** - * Check if an export is documented - */ -function isDocumented(name: string, documented: Set): boolean { - const lowerName = name.toLowerCase(); - - if (documented.has(lowerName)) return true; - - const withoutSuffix = lowerName.replace(/(extension|plugin|mark|node)$/, ''); - if (documented.has(withoutSuffix)) return true; - - const kebab = lowerName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); - if (documented.has(kebab)) return true; - - return false; -} - -/** - * Main scanner function - */ -function scanCoverage(): CoverageReport { - const documented = getDocumentedExports(); - - const entryPoints = [join(SUPER_EDITOR_SRC, 'index.js'), join(SUPER_EDITOR_SRC, 'extensions/index.js')]; - - const allExports: ExportInfo[] = []; - - for (const entryPoint of entryPoints) { - if (!existsSync(entryPoint)) { - console.warn(`Entry point not found: ${entryPoint}`); - continue; - } - - const exports = parseExports(entryPoint); - for (const { name, isInternal } of exports) { - if (name.startsWith('_') || name === 'default') continue; - - const type = categorizeExport(name); - const hasDoc = isDocumented(name, documented); - - if (!allExports.find((e) => e.name === name)) { - allExports.push({ - name, - source: basename(entryPoint), - type, - hasDoc, - isInternal, - }); - } - } - } - - const internalCount = allExports.filter((e) => e.isInternal).length; - const publicExports = allExports.filter((e) => !e.isInternal); - const documentedCount = publicExports.filter((e) => e.hasDoc).length; - const publicTotal = publicExports.length; - - return { - total: allExports.length, - internal: internalCount, - public: publicTotal, - documented: documentedCount, - undocumented: publicTotal - documentedCount, - percentage: publicTotal > 0 ? Math.round((documentedCount / publicTotal) * 100) : 0, - exports: allExports, - }; -} - -/** - * Print coverage report - */ -function printReport(report: CoverageReport) { - console.log('\n========================================'); - console.log(' SuperDoc Documentation Coverage'); - console.log('========================================\n'); - - console.log(`Total exports: ${report.total}`); - console.log(`Internal (@internal): ${report.internal}`); - console.log(`Public exports: ${report.public}`); - console.log(`Documented: ${report.documented} (${report.percentage}%)`); - console.log(`Undocumented: ${report.undocumented} (${100 - report.percentage}%)\n`); - - // Show internal exports - const internal = report.exports.filter((e) => e.isInternal); - if (internal.length > 0) { - console.log('--- Internal Exports (excluded from coverage) ---\n'); - for (const exp of internal) { - console.log(` @internal ${exp.name} (${exp.type})`); - } - console.log(''); - } - - // Group public by type - const publicExports = report.exports.filter((e) => !e.isInternal); - const byType = new Map(); - for (const exp of publicExports) { - const list = byType.get(exp.type) || []; - list.push(exp); - byType.set(exp.type, list); - } - - console.log('--- Public Coverage by Type ---\n'); - for (const [type, exports] of byType) { - const documented = exports.filter((e) => e.hasDoc).length; - const pct = Math.round((documented / exports.length) * 100); - console.log(`${type.padEnd(12)} ${documented}/${exports.length} (${pct}%)`); - } - - console.log('\n--- Undocumented Public Exports ---\n'); - for (const [type, exports] of byType) { - const undoc = exports.filter((e) => !e.hasDoc); - if (undoc.length === 0) continue; - - console.log(`[${type}]`); - for (const exp of undoc) { - console.log(` - ${exp.name}`); - } - console.log(''); - } - - console.log('--- Documented Public Exports ---\n'); - const doc = publicExports.filter((e) => e.hasDoc); - for (const exp of doc.slice(0, 20)) { - console.log(` ✓ ${exp.name} (${exp.type})`); - } - if (doc.length > 20) { - console.log(` ... and ${doc.length - 20} more\n`); - } - - console.log('\n========================================'); - console.log(' Gap Assessment'); - console.log('========================================\n'); - - if (report.percentage >= 80) { - console.log('✅ Coverage is GOOD (≥80%).'); - } else if (report.percentage >= 50) { - console.log('⚠️ Coverage is MODERATE (50-80%). Consider prioritizing core APIs first.'); - } else { - console.log('❌ Coverage is LOW (<50%). Consider grandfathering existing + progressive rollout.'); - } - console.log(''); -} - -// Run -const report = scanCoverage(); -printReport(report); From 2e662c5617554b07aa26a3cc95e862d1e0ad5965 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:33:36 -0300 Subject: [PATCH 38/45] chore: tweak storage --- apps/docs/guides/general/storage.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/guides/general/storage.mdx b/apps/docs/guides/general/storage.mdx index 2989fb5b94..899a3debfd 100644 --- a/apps/docs/guides/general/storage.mdx +++ b/apps/docs/guides/general/storage.mdx @@ -71,7 +71,7 @@ When the document is requested later, look up the latest version in your databas The ways to export a document are covered in [Import/Export](/getting-started/import-export#export-options). -Store the [full DOCX binary](/getting-started/import-export#docx-export-full-fidelity) for the highest fidelity version of the document. Other export options (such as [JSON](/getting-started/import-export#json-export-full-fidelity)) are also available. +Store the [full DOCX binary](/getting-started/import-export#docx-export-full-fidelity) for the highest fidelity version of the document. ## Best practices From e54291b39e2822fc330524f4d3542d1d534f5c70 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:34:30 -0300 Subject: [PATCH 39/45] docs: fix factual errors in extension docs - strike: fix keyboard shortcut from Mod-Shift-s to Mod-Shift-x - text-align: remove phantom options (types, defaultAlignment) and attribute (textAlign) - field-annotation: fix annotationClass default, rename defaultColor to borderColor, remove ghost maxAnnotations - run-item: fix source code link to run/run.js - text-indent: fix command names (setTextIndentation), param type (number in points), remove phantom options - line-height: fix param type (number multiplier), remove phantom options/attributes, fix source link --- apps/docs/extensions/field-annotation.mdx | 10 +-- apps/docs/extensions/line-height.mdx | 53 ++------------ apps/docs/extensions/run-item.mdx | 2 +- apps/docs/extensions/strike.mdx | 2 +- apps/docs/extensions/text-align.mdx | 22 +----- apps/docs/extensions/text-indent.mdx | 84 +++++------------------ 6 files changed, 29 insertions(+), 144 deletions(-) diff --git a/apps/docs/extensions/field-annotation.mdx b/apps/docs/extensions/field-annotation.mdx index 78d0157f55..c64c56e48b 100644 --- a/apps/docs/extensions/field-annotation.mdx +++ b/apps/docs/extensions/field-annotation.mdx @@ -13,16 +13,12 @@ description: "Interactive form fields for documents. It can be used when variabl Handle drops outside editor viewport - + CSS class for field styling - - Default field background color - - - - Maximum annotations per document + + Default field border color diff --git a/apps/docs/extensions/line-height.mdx b/apps/docs/extensions/line-height.mdx index d51ec9d960..c64810199c 100644 --- a/apps/docs/extensions/line-height.mdx +++ b/apps/docs/extensions/line-height.mdx @@ -1,68 +1,35 @@ --- -title: LineHeight extension +title: Line Height sidebarTitle: "Line Height" -keywords: "LineHeight extension, superdoc LineHeight, word LineHeight, document LineHeight, docx LineHeight" +keywords: "line height, superdoc line height, word line height, document line spacing, docx line height" --- import Description from '/snippets/extensions/line-height.mdx' -## Options - -Configure the extension behavior: - - - Block types to add line height support to - - - - Default configuration - - - - Default unit for line height values - - -## Attributes - -Node attributes that can be set and retrieved: - - - Line height value - - ## Commands ### `setLineHeight` -Set line height for blocks - - -Applies to paragraphs and headings - +Set line height as a multiplier (e.g., 1.5 for 1.5x line spacing). **Example:** ```javascript editor.commands.setLineHeight(1.5) -editor.commands.setLineHeight('24px') editor.commands.setLineHeight(2) ``` **Parameters:** - - Line height to apply + + Line height multiplier (e.g., 1.0 for single, 1.5, 2.0 for double) ### `unsetLineHeight` -Remove line height - - -Reverts to default line spacing - +Remove line height and revert to default line spacing. **Example:** @@ -70,15 +37,9 @@ Reverts to default line spacing editor.commands.unsetLineHeight() ``` -## Types - -### `LineHeightValue` - -Line height as number (1.5) or string with unit ('1.5em', '24px') - ## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' - + diff --git a/apps/docs/extensions/run-item.mdx b/apps/docs/extensions/run-item.mdx index 4d36aa03bf..3ba53f3daf 100644 --- a/apps/docs/extensions/run-item.mdx +++ b/apps/docs/extensions/run-item.mdx @@ -13,4 +13,4 @@ import Description from '/snippets/extensions/run-item.mdx' import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' - + diff --git a/apps/docs/extensions/strike.mdx b/apps/docs/extensions/strike.mdx index 1d028296fa..e737dc6454 100644 --- a/apps/docs/extensions/strike.mdx +++ b/apps/docs/extensions/strike.mdx @@ -52,7 +52,7 @@ editor.commands.toggleStrike() | Command | Shortcut | Description | |---------|----------|-------------| -| toggleStrike() | `⌘/Ctrl-Shift-s` | Toggle strikethrough formatting | +| toggleStrike() | `⌘/Ctrl-Shift-x` | Toggle strikethrough formatting | ## Source code diff --git a/apps/docs/extensions/text-align.mdx b/apps/docs/extensions/text-align.mdx index d4896da0c8..1e50949968 100644 --- a/apps/docs/extensions/text-align.mdx +++ b/apps/docs/extensions/text-align.mdx @@ -12,35 +12,15 @@ import Description from '/snippets/extensions/text-align.mdx' Configure the extension behavior: - - Node types to apply alignment to - - Available alignment options - - Default text alignment - - -## Attributes - -Node attributes that can be set and retrieved: - - - Text alignment value (left, center, right, justify) - - ## Commands ### `setTextAlign` -Set text alignment - - -Applies to all configured node types (heading, paragraph by default) - +Set text alignment on the current paragraph. **Example:** diff --git a/apps/docs/extensions/text-indent.mdx b/apps/docs/extensions/text-indent.mdx index a70a6e2773..dde97c2c6b 100644 --- a/apps/docs/extensions/text-indent.mdx +++ b/apps/docs/extensions/text-indent.mdx @@ -1,92 +1,48 @@ --- -title: TextIndent extension +title: Text Indent sidebarTitle: "Text Indent" -keywords: "TextIndent extension, superdoc TextIndent, word TextIndent, document TextIndent, docx TextIndent" +keywords: "text indent, superdoc text indent, word text indent, document indentation, docx indent" --- import Description from '/snippets/extensions/text-indent.mdx' -## Options - -Configure the extension behavior: - - - Node types to apply indentation to - - - - Default indentation settings - - - - Default unit for indentation (in, cm, px, etc.) - - - - Default increment/decrement value - - -## Attributes - -Node attributes that can be set and retrieved: - - - Text indentation value with unit (e.g., '0.5in') - - ## Commands -### `setTextIndent` +### `setTextIndentation` -Set text indentation - - -Accepts any valid CSS unit (in, cm, px, em, etc.) - +Set text indentation in points. **Example:** ```javascript -// Set to 0.5 inches -setTextIndent('0.5in') +// Set to 72 points (1 inch) +editor.commands.setTextIndentation(72) -// Set to 2 centimeters -setTextIndent('2cm') +// Set to 36 points (0.5 inch) +editor.commands.setTextIndentation(36) ``` **Parameters:** - - Indentation value with unit (e.g., '0.5in', '2cm') + + Indentation value in points -**Returns:** `Function` Command function - -### `unsetTextIndent` - -Remove text indentation +### `unsetTextIndentation` - -Removes all indentation from the selected nodes - +Remove text indentation from selected paragraphs. **Example:** ```javascript -editor.commands.unsetTextIndent() +editor.commands.unsetTextIndentation() ``` -**Returns:** `Function` Command function - ### `increaseTextIndent` -Increase text indentation - - -Creates initial indent if none exists - +Increase text indentation by 36 points (0.5 inch). **Example:** @@ -94,15 +50,9 @@ Creates initial indent if none exists editor.commands.increaseTextIndent() ``` -**Returns:** `Function` Command function - ### `decreaseTextIndent` -Decrease text indentation - - -Removes indentation completely if it reaches 0 or below - +Decrease text indentation by 36 points. Removes indentation completely if it reaches 0 or below. **Example:** @@ -110,11 +60,9 @@ Removes indentation completely if it reaches 0 or below editor.commands.decreaseTextIndent() ``` -**Returns:** `Function` Command function - ## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' - + From 02e1cf9bf121845d37c54a1198c2c75748053512 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:36:45 -0300 Subject: [PATCH 40/45] docs: rewrite phantom extension pages (bullet-list, ordered-list, list-item) These pages documented extensions that don't exist as separate source files. List functionality lives in the Paragraph extension. - bullet-list: remove phantom options/attributes, point to paragraph.js - ordered-list: remove ghost commands (restartListNodes, updateOrderedListStyleType), add real restartNumbering command - list-item: remove misattributed commands from linked-styles/custom-selection, keep keyboard shortcuts and numbering formats --- apps/docs/extensions/bullet-list.mdx | 63 ++---- apps/docs/extensions/list-item.mdx | 292 ++------------------------ apps/docs/extensions/ordered-list.mdx | 104 ++------- 3 files changed, 44 insertions(+), 415 deletions(-) diff --git a/apps/docs/extensions/bullet-list.mdx b/apps/docs/extensions/bullet-list.mdx index d961c78e0d..66b473337b 100644 --- a/apps/docs/extensions/bullet-list.mdx +++ b/apps/docs/extensions/bullet-list.mdx @@ -1,70 +1,26 @@ --- -title: BulletList extension +title: Bullet list sidebarTitle: "Bullet List" -keywords: "BulletList extension, superdoc BulletList, word BulletList, document BulletList, docx BulletList" +keywords: "bullet list, superdoc bullet list, word bullet list, document bullet list, docx bullet list" --- import Description from '/snippets/extensions/bullet-list.mdx' -## Options - -Configure the extension behavior: - - - Name of the list item node type - - - - HTML attributes for the ul element - - - - Whether to preserve attributes when splitting - - - - Whether to preserve marks when splitting - - -**Example:** - -```javascript -const ConfiguredBulletList = BulletList.configure({ - itemTypeName: 'customItem', - keepMarks: false -}); - -new SuperDoc({ - selector: '#editor', - document: 'document.docx', - editorExtensions: [ConfiguredBulletList] -}); -``` - -## Attributes - -Node attributes that can be set and retrieved: - - - List style type for this list - + +Bullet list functionality is part of the [Paragraph extension](/extensions/paragraph). There is no separate bullet list extension. + ## Commands ### `toggleBulletList` -Toggle a bullet list at the current selection - - -Converts selected paragraphs to list items or removes list formatting - +Toggle bullet list formatting on the current selection. Converts selected paragraphs to list items or removes list formatting. **Example:** ```javascript -// Toggle bullet list on selected text editor.commands.toggleBulletList() ``` @@ -73,10 +29,15 @@ editor.commands.toggleBulletList() | Command | Shortcut | Description | |---------|----------|-------------| | toggleBulletList() | `⌘/Ctrl-Shift-8` | Toggle bullet list | +| (indent) | `Tab` | Increase list indentation | +| (outdent) | `Shift-Tab` | Decrease list indentation | + +## Input rules +Type `- `, `* `, or `+ ` followed by a space to start a bullet list automatically. ## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' - + diff --git a/apps/docs/extensions/list-item.mdx b/apps/docs/extensions/list-item.mdx index e44b6a1bfe..d14eccb64a 100644 --- a/apps/docs/extensions/list-item.mdx +++ b/apps/docs/extensions/list-item.mdx @@ -1,295 +1,37 @@ --- -title: ListItem extension +title: List item sidebarTitle: "List Item" -keywords: "ListItem extension, superdoc ListItem, word ListItem, document ListItem, docx ListItem" +keywords: "list item, superdoc list item, word list item, document list item, docx list item" --- import Description from '/snippets/extensions/list-item.mdx' -## Options - -Configure the extension behavior: - - - HTML attributes for list item elements - - - - Name of bullet list node type - - - - Name of ordered list node type - - -## Attributes - -Node attributes that can be set and retrieved: - - - Virtual attribute for marker display - - - - Level text template for numbering - - - - Numbering format type - - - - List level hierarchy - - - - Level justification (left, right, center) - - - - Indentation and spacing info - - - - Run properties for list item - - - - Numbering definition ID - - - - Numbering properties type - - - - Current nesting level - - - - Additional attributes - - - - Spacing configuration - - - - Indentation settings - - - - Marker styling - - - - Linked style ID - - - - Custom numbering format - - - - Font family from import - - - - Font size from import - - -## Commands - -### `setLinkedStyle` - -Apply a linked style to the selected paragraphs - - -Works with custom selection preservation - - -**Example:** - -```javascript -const style = editor.helpers.linkedStyles.getStyleById('Heading1'); -editor.commands.setLinkedStyle(style); -``` - -**Parameters:** - - - The style object to apply - - -### `toggleLinkedStyle` - -Toggle a linked style on the current selection - - -Removes style if already applied, applies it if not - - -**Example:** - -```javascript -const style = editor.helpers.linkedStyles.getStyleById('Heading1'); -editor.commands.toggleLinkedStyle(style) -editor.commands.toggleLinkedStyle(style, 'paragraph') -``` - -**Parameters:** - - - The linked style to apply (with id property) - - - Node type to restrict toggle to (e.g., 'paragraph') - - -### `setStyleById` - -Apply a linked style by its ID - - -Looks up the style from loaded Word styles - - -**Example:** - -```javascript -editor.commands.setStyleById('Heading1') -editor.commands.setStyleById('Normal') -``` - -**Parameters:** - - - The style ID to apply (e.g., 'Heading1') - - -### `restorePreservedSelection` - -Restore the preserved selection - - -Used internally to maintain selection when interacting with toolbar - - -**Example:** - -```javascript -// Restore selection after toolbar interaction -editor.commands.restorePreservedSelection() -``` - -**Returns:** `Function` Command function - -## Helpers - -### `getStyles` - -Get all available linked styles - -**Example:** - -```javascript -const styles = editor.helpers.linkedStyles.getStyles(); -// Returns all styles from the Word document -``` - -**Returns:** - - - Array of linked style objects - - -### `getStyleById` - -Get a specific style by ID - -**Example:** - -```javascript -const headingStyle = editor.helpers.linkedStyles.getStyleById('Heading1'); -``` - -**Parameters:** - - - The style ID to find - - -**Returns:** - - - The style object or undefined - + +List item behavior is handled by the [Paragraph extension](/extensions/paragraph). Lists in SuperDoc are paragraphs with numbering properties, matching how Word stores lists internally. + ## Keyboard shortcuts | Command | Shortcut | Description | |---------|----------|-------------| -| splitListItem() | `Enter` | Split list item at cursor | -| createParagraphNear() | `Shift-Enter` | Create paragraph in list | -| increaseListIndent() | `Tab` | Increase list indentation | -| decreaseListIndent() | `Shift-Tab` | Decrease list indentation | - -## Types - -### `IndentObject` - - - - The left indent value - - - The right indent value - - - The first line indent value - - - The hanging indent value - - - -### `LinkedStyle` - -Style definition from Word document - - - - Style ID (e.g., 'Heading1', 'Normal') - - - Style type ('paragraph' or 'character') - - - Style definition from Word - - - -### `SelectionState` - -Selection state +| (split item) | `Enter` | Split list item at cursor | +| (line break) | `Shift-Enter` | Add a line break within the current item | +| (indent) | `Tab` | Increase nesting level | +| (outdent) | `Shift-Tab` | Decrease nesting level | - - - Whether editor is focused - - - Stored selection - - - Whether to show selection decoration - - +## Numbering formats +Supported numbering formats from Word: +- **Decimal** — 1, 2, 3, 4... +- **Lower alpha** — a, b, c, d... +- **Upper alpha** — A, B, C, D... +- **Lower roman** — i, ii, iii, iv... +- **Upper roman** — I, II, III, IV... ## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' - + diff --git a/apps/docs/extensions/ordered-list.mdx b/apps/docs/extensions/ordered-list.mdx index 273f0734f2..5ec2fcb761 100644 --- a/apps/docs/extensions/ordered-list.mdx +++ b/apps/docs/extensions/ordered-list.mdx @@ -1,74 +1,22 @@ --- -title: OrderedList extension +title: Ordered list sidebarTitle: "Ordered List" -keywords: "OrderedList extension, superdoc OrderedList, word OrderedList, document OrderedList, docx OrderedList" +keywords: "ordered list, superdoc ordered list, word ordered list, document numbered list, docx ordered list" --- import Description from '/snippets/extensions/ordered-list.mdx' -## Options - -Configure the extension behavior: - - - Name of list item node type - - - - HTML attributes for ordered list elements - - - - Whether to preserve marks when creating lists - - - - Whether to preserve attributes - - - - Available list style types - - -## Attributes - -Node attributes that can be set and retrieved: - - - Starting number for the list - - - - Block identifier for tracking - - - - Synchronization identifier - - - - List identifier - - - - List style type (decimal, lowerAlpha, lowerRoman) - - - - Additional attributes - + +Ordered list functionality is part of the [Paragraph extension](/extensions/paragraph). There is no separate ordered list extension. + ## Commands ### `toggleOrderedList` -Toggle ordered list formatting - - -Converts selection to ordered list or back to paragraphs - +Toggle ordered list formatting on the current selection. Converts selected paragraphs to numbered list items or removes list formatting. **Example:** @@ -76,41 +24,14 @@ Converts selection to ordered list or back to paragraphs editor.commands.toggleOrderedList() ``` -### `restartListNodes` - -Restart list node numbering +### `restartNumbering` - -Resets list numbering for specified nodes - +Restart list numbering from the current position. **Example:** ```javascript -editor.commands.restartListNodes(nodes, position) -``` - -**Parameters:** - - - Nodes to restart - - - Starting position - - -### `updateOrderedListStyleType` - -Update ordered list style type based on nesting level - - -Cycles through decimal -> lowerAlpha -> lowerRoman based on depth - - -**Example:** - -```javascript -editor.commands.updateOrderedListStyleType() +editor.commands.restartNumbering() ``` ## Keyboard shortcuts @@ -118,10 +39,15 @@ editor.commands.updateOrderedListStyleType() | Command | Shortcut | Description | |---------|----------|-------------| | toggleOrderedList() | `⌘/Ctrl-Shift-7` | Toggle ordered list | +| (indent) | `Tab` | Increase list indentation | +| (outdent) | `Shift-Tab` | Decrease list indentation | + +## Input rules +Type `1. ` followed by a space to start a numbered list automatically. ## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' - + From dd453d22bab473f670e2e60e034f7466002faf01 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:48:41 -0300 Subject: [PATCH 41/45] docs: rewrite severely outdated extension pages - comments: replace 4 ghost commands with 7 real ones (addComment, addCommentReply, removeComment, resolveComment, setActiveComment, setCommentInternal, setCursorById) - track-changes: replace 4 ghost commands with all 21 real commands, fix helper names - linked-styles: fix title from "CustomSelection" to "Linked Styles", remove mixed content, correct source link - document-section: remove 3 ghost config options, 4 ghost events, ghost limitations --- apps/docs/extensions/comments.mdx | 134 ++++++++++---- apps/docs/extensions/document-section.mdx | 215 ++++------------------ apps/docs/extensions/linked-styles.mdx | 92 ++------- apps/docs/extensions/track-changes.mdx | 142 +++++++++----- 4 files changed, 250 insertions(+), 333 deletions(-) diff --git a/apps/docs/extensions/comments.mdx b/apps/docs/extensions/comments.mdx index 24c9c97eab..4932c9efb5 100644 --- a/apps/docs/extensions/comments.mdx +++ b/apps/docs/extensions/comments.mdx @@ -1,13 +1,13 @@ --- -title: Comments Extension +title: Comments extension sidebarTitle: Comments --- -The Comments extension enables Word-style commenting with threads, replies, and resolution. +The Comments extension adds Word-style commenting with threads, replies, and resolution. ## Usage -Comments work through the module configuration: +Configure comments through the modules option: ```javascript modules: { @@ -20,44 +20,107 @@ modules: { ## Commands +### `addComment` + +Add a comment to the current text selection. Requires text to be selected. + ```javascript -// Add comment at selection -editor.commands.insertComment({ - content: 'Please review' -}); +// Simple text comment +editor.commands.addComment('Please review this section') + +// With options +editor.commands.addComment({ + content: 'Please review', + author: 'Jane Smith', + authorEmail: 'jane@example.com', + isInternal: false +}) +``` + +**Parameters:** + + + Comment text, or an options object with `content`, `author`, `authorEmail`, `authorImage`, and `isInternal` fields + -// Work with comments -editor.commands.replyToComment(commentId, { content: 'Done' }); -editor.commands.resolveComment(commentId); -editor.commands.deleteComment(commentId); +### `addCommentReply` -// Navigate -editor.commands.goToNextComment(); -editor.commands.goToPreviousComment(); +Add a reply to an existing comment thread. + +```javascript +editor.commands.addCommentReply({ + parentId: 'comment-123', + content: 'Done, updated the wording.' +}) ``` -## Events +**Parameters:** + + + Object with `parentId` (required), `content`, `author`, `authorEmail`, `authorImage` + + +### `removeComment` + +Remove a comment and its highlight marks from the document. ```javascript -superdoc.on('commentsUpdate', ({ type, comment }) => { - switch(type) { - case 'add': // Comment created - case 'update': // Comment edited - case 'deleted': // Comment removed - case 'resolved': // Comment resolved - } -}); +editor.commands.removeComment({ commentId: 'abc-123' }) ``` -## Working with comment data +**Parameters:** + + + Object with `commentId` and/or `importedId` + + +### `resolveComment` + +Resolve a comment. Removes the highlight but preserves positional anchors for export. ```javascript -// Access all comments -const comments = editor.storage.comments.items; +editor.commands.resolveComment({ commentId: 'abc-123' }) +``` + +**Parameters:** + + + Object with `commentId` + + +### `setActiveComment` -// Filter comments -const active = comments.filter(c => !c.resolved); -const byUser = comments.filter(c => c.user.email === email); +Set the active/selected comment thread by ID. + +```javascript +editor.commands.setActiveComment({ commentId: 'abc-123' }) +``` + +### `setCommentInternal` + +Toggle whether a comment is internal (private) or external. + +```javascript +editor.commands.setCommentInternal({ + commentId: 'abc-123', + isInternal: true +}) +``` + +### `setCursorById` + +Move the cursor to the start of a comment's range. Also works for tracked change IDs. + +```javascript +editor.commands.setCursorById('abc-123') +``` + +## Events + +```javascript +superdoc.on('commentsUpdate', ({ type, comment }) => { + // type: 'ADD' | 'deleted' | 'SELECTED' +}); ``` ## Export behavior @@ -65,17 +128,14 @@ const byUser = comments.filter(c => c.user.email === email); Comments export to DOCX as native Word comments: ```javascript -// Include comments await superdoc.export({ commentsType: 'external' }); -// Clean export +// Without comments await superdoc.export({ commentsType: 'clean' }); ``` -## Styling +## Source code -```css -.comment-mark { background: #fff3cd; } -.comment-mark.resolved { opacity: 0.6; } -.comment-mark.active { background: #ffd700; } -``` +import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' + + diff --git a/apps/docs/extensions/document-section.mdx b/apps/docs/extensions/document-section.mdx index 316160e540..4386768b78 100644 --- a/apps/docs/extensions/document-section.mdx +++ b/apps/docs/extensions/document-section.mdx @@ -1,5 +1,5 @@ --- -title: Document Section Extension +title: Document Section extension sidebarTitle: Document Section --- @@ -13,23 +13,11 @@ Included by default in SuperDoc. import { DocumentSection } from 'superdoc/extensions'; ``` -## Configuration - -```javascript -// Configure during initialization -DocumentSection.configure({ - // Configuration options - allowNested: false, // Don't allow nested sections - maxSize: 100000, // Maximum characters per section - defaultLocked: false // Default lock state -}); -``` - ## Commands -All commands available on `editor.commands`: +### `createDocumentSection` -### Section creation +Create a new document section. ```javascript editor.commands.createDocumentSection({ @@ -41,12 +29,35 @@ editor.commands.createDocumentSection({ }) ``` -### Section manipulation +### `removeSectionAtSelection` + +Remove the section at the current cursor position. ```javascript editor.commands.removeSectionAtSelection() +``` + +### `removeSectionById` + +Remove a section by its ID. + +```javascript editor.commands.removeSectionById('legal-1') +``` + +### `lockSectionById` + +Lock a section to prevent editing. + +```javascript editor.commands.lockSectionById('legal-1') +``` + +### `updateSectionById` + +Update a section's content or attributes. + +```javascript editor.commands.updateSectionById({ id: 'legal-1', html: '

    Updated...

    ', @@ -54,34 +65,26 @@ editor.commands.updateSectionById({ }) ``` -## Helper functions - - +## Helpers ```javascript -import { SectionHelpers } from 'superdoc'; - // Get all sections -const sections = SectionHelpers.getAllSections(editor); +const sections = editor.helpers.documentSection.getAllSections(editor); // Export sections -const html = SectionHelpers.exportSectionsToHTML(editor); -const json = SectionHelpers.exportSectionsToJSON(editor); +const html = editor.helpers.documentSection.exportSectionsToHTML(editor); +const json = editor.helpers.documentSection.exportSectionsToJSON(editor); -// Create linked editor -const childEditor = SectionHelpers.getLinkedSectionEditor( +// Create a linked editor for a section +const childEditor = editor.helpers.documentSection.getLinkedSectionEditor( 'section-id', { element: '#editor' }, parentEditor ); ``` - - ## Attributes -Section nodes have these attributes: - | Attribute | Type | Default | Description | |-----------|------|---------|-------------| | `id` | string/number | auto | Unique identifier | @@ -90,68 +93,6 @@ Section nodes have these attributes: | `sectionType` | string | '' | Business classification | | `isLocked` | boolean | false | Edit prevention | -## Events - -The extension emits these events: - -```javascript -editor.on('section:created', ({ section }) => { - console.log('Section created:', section.id); -}); - -editor.on('section:updated', ({ section, changes }) => { - console.log('Section updated:', section.id); -}); - -editor.on('section:removed', ({ sectionId }) => { - console.log('Section removed:', sectionId); -}); - -editor.on('section:locked', ({ sectionId, locked }) => { - console.log('Lock changed:', sectionId, locked); -}); -``` - -## Schema - -### Node definition - -```javascript -{ - name: 'documentSection', - group: 'block', - content: 'block*', - atom: true, - isolating: true, - attrs: { - id: { default: null }, - title: { default: '' }, - description: { default: '' }, - sectionType: { default: '' }, - isLocked: { default: false } - } -} -``` - -### HTML Structure - -```html - -
    -

    Section content...

    -
    - - -
    -
    Terms & Conditions
    -
    -

    Section content...

    -
    -
    -``` - ## Word export Sections export as Word content controls: @@ -193,101 +134,19 @@ contractSections.forEach(section => { ```javascript function applyRolePermissions(userRole) { - const sections = SectionHelpers.getAllSections(editor); - + const sections = editor.helpers.documentSection.getAllSections(editor); + sections.forEach(({ node }) => { const { id, sectionType } = node.attrs; - + if (sectionType === 'legal' && userRole !== 'legal') { editor.commands.lockSectionById(id); - } else if (sectionType === 'pricing' && userRole === 'viewer') { - editor.commands.lockSectionById(id); - } - }); -} -``` - -### Section templates - -```javascript -const templates = { - header: { - title: 'Document Header', - sectionType: 'header', - html: '

    Agreement

    Date: [DATE]

    ' - }, - legalTerms: { - title: 'Legal Terms', - sectionType: 'legal', - isLocked: true, - html: loadLegalTemplate() - } -}; - -function insertTemplate(templateId) { - const template = templates[templateId]; - editor.commands.createDocumentSection({ - ...template, - id: generateId() - }); -} -``` - -### Conditional content - -```javascript -// Show/hide sections based on conditions -function updateSectionsForRegion(region) { - const sections = SectionHelpers.getAllSections(editor); - - sections.forEach(({ node, pos }) => { - if (node.attrs.sectionType === 'regional') { - if (!node.attrs.regions?.includes(region)) { - editor.commands.removeSectionById(node.attrs.id); - } } }); - - // Add region-specific sections - if (region === 'EU') { - editor.commands.createDocumentSection({ - id: 'gdpr', - title: 'GDPR Compliance', - sectionType: 'regional', - html: gdprTemplate - }); - } } ``` -## Limitations - -- Cannot nest sections -- Maximum 100K characters per section -- Locked sections still selectable -- Section IDs must be unique - -## Performance - -For documents with many sections: - -```javascript -// Batch updates -editor.chain() - .command(() => { - sections.forEach(s => { - editor.commands.updateSectionById(s); - }); - return true; - }) - .run(); - -// Lazy loading -const visibleSections = getVisibleSections(); -visibleSections.forEach(loadSectionContent); -``` - ## Related - [Field Annotation](/extensions/field-annotation) - Form fields -- [Table Extension](/extensions/table) - Tables \ No newline at end of file +- [Structured Content](/extensions/structured-content) - Structured content blocks diff --git a/apps/docs/extensions/linked-styles.mdx b/apps/docs/extensions/linked-styles.mdx index b3f87d84ad..151542acbf 100644 --- a/apps/docs/extensions/linked-styles.mdx +++ b/apps/docs/extensions/linked-styles.mdx @@ -1,39 +1,18 @@ --- -title: CustomSelection extension -sidebarTitle: "Custom Selection" -keywords: "CustomSelection extension, superdoc CustomSelection, word CustomSelection, document CustomSelection, docx CustomSelection" +title: Linked Styles extension +sidebarTitle: "Linked Styles" +keywords: "linked styles, superdoc linked styles, word styles, document styles, docx styles" --- -import Description from '/snippets/extensions/custom-selection.mdx' +import Description from '/snippets/extensions/linked-styles.mdx' ## Commands -### `restorePreservedSelection` - -Restore the preserved selection - - -Used internally to maintain selection when interacting with toolbar - - -**Example:** - -```javascript -// Restore selection after toolbar interaction -editor.commands.restorePreservedSelection() -``` - -**Returns:** `Function` Command function - ### `setLinkedStyle` -Apply a linked style to the selected paragraphs - - -Works with custom selection preservation - +Apply a linked style to the selected paragraphs. **Example:** @@ -50,17 +29,14 @@ editor.commands.setLinkedStyle(style); ### `toggleLinkedStyle` -Toggle a linked style on the current selection - - -Removes style if already applied, applies it if not - +Toggle a linked style on the current selection. Removes the style if already applied, applies it if not. **Example:** ```javascript const style = editor.helpers.linkedStyles.getStyleById('Heading1'); editor.commands.toggleLinkedStyle(style) +editor.commands.toggleLinkedStyle(style, 'paragraph') ``` **Parameters:** @@ -68,14 +44,13 @@ editor.commands.toggleLinkedStyle(style) The linked style to apply (with id property) + + Node type to restrict toggle to (e.g., 'paragraph') + ### `setStyleById` -Apply a linked style by its ID - - -Looks up the style from loaded Word styles - +Apply a linked style by its ID. **Example:** @@ -94,13 +69,12 @@ editor.commands.setStyleById('Normal') ### `getStyles` -Get all available linked styles +Get all available linked styles from the document. **Example:** ```javascript const styles = editor.helpers.linkedStyles.getStyles(); -// Returns all styles from the Word document ``` **Returns:** @@ -111,7 +85,7 @@ const styles = editor.helpers.linkedStyles.getStyles(); ### `getStyleById` -Get a specific style by ID +Get a specific style by ID. **Example:** @@ -133,45 +107,9 @@ const headingStyle = editor.helpers.linkedStyles.getStyleById('Heading1'); ## Types -### `SelectionState` - -Selection state - - - - Whether editor is focused - - - Stored selection - - - Whether to show selection decoration - - - Whether to skip clearing selection on next focus - - - -### `ParentNodeInfo` - - - - The position of the parent node. - - - The start position of the parent node. - - - The depth of the parent node. - - - The parent node. - - - ### `LinkedStyle` -Style definition from Word document +Style definition from a Word document. @@ -190,4 +128,4 @@ Style definition from Word document import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' - + diff --git a/apps/docs/extensions/track-changes.mdx b/apps/docs/extensions/track-changes.mdx index 2720f94358..2e31920171 100644 --- a/apps/docs/extensions/track-changes.mdx +++ b/apps/docs/extensions/track-changes.mdx @@ -1,83 +1,143 @@ --- -title: Track Changes Extension +title: Track Changes extension sidebarTitle: Track Changes --- -Track Changes records all edits with author attribution and timestamps, exactly like Microsoft Word. +Track Changes records all edits with author attribution and timestamps, matching Microsoft Word's revision tracking. ## Usage Enable through document mode: ```javascript -// Start tracking -superdoc.setDocumentMode('suggesting'); +superdoc.setDocumentMode('suggesting'); // Enable tracking +superdoc.setDocumentMode('editing'); // Disable tracking +``` + +Or toggle programmatically: + +```javascript +editor.commands.enableTrackChanges() +editor.commands.disableTrackChanges() +editor.commands.toggleTrackChanges() ``` ## Commands +### Accept changes + ```javascript -// Switch modes (controls tracking) -superdoc.setDocumentMode('suggesting'); // Enable tracking -superdoc.setDocumentMode('editing'); // Disable tracking +// Accept at current selection +editor.commands.acceptTrackedChangeBySelection() -// Review changes -editor.commands.acceptChange(); -editor.commands.rejectChange(); -editor.commands.acceptAllChanges(); -editor.commands.rejectAllChanges(); +// Accept a specific change by ID +editor.commands.acceptTrackedChangeById('change-123') -// Navigate -editor.commands.goToNextChange(); -editor.commands.goToPreviousChange(); +// Accept a change object (with start/end positions) +editor.commands.acceptTrackedChange({ trackedChange: { start: 10, end: 50 } }) -// View modes -editor.commands.toggleTrackChangesShowOriginal(); -editor.commands.toggleTrackChangesShowFinal(); +// Accept changes in a range +editor.commands.acceptTrackedChangesBetween(10, 50) + +// Accept all changes in the document +editor.commands.acceptAllTrackedChanges() + +// Toolbar-aware accept (uses active thread or selection) +editor.commands.acceptTrackedChangeFromToolbar() ``` -## Working with changes +### Reject changes + +```javascript +// Reject at current selection +editor.commands.rejectTrackedChangeOnSelection() + +// Reject a specific change by ID +editor.commands.rejectTrackedChangeById('change-123') + +// Reject a change object +editor.commands.rejectTrackedChange({ trackedChange: { start: 10, end: 50 } }) - +// Reject changes in a range +editor.commands.rejectTrackedChangesBetween(10, 50) + +// Reject all changes in the document +editor.commands.rejectAllTrackedChanges() + +// Toolbar-aware reject +editor.commands.rejectTrackedChangeFromToolbar() +``` + +### Insert tracked change programmatically + +Use `insertTrackedChange` to add tracked edits from external sources (e.g., AI suggestions): ```javascript -import { trackChangesHelpers } from 'superdoc'; +editor.commands.insertTrackedChange({ + from: 10, + to: 25, + text: 'replacement text', + comment: 'AI suggestion: improved wording' +}) +``` + +**Parameters:** -// Get all changes -const changes = trackChangesHelpers.getAllChanges(editor.state); + + Object with `from`, `to`, `text`, `user`, `comment`, `addToHistory`, `emitCommentEvent` + -// Filter by user -const userChanges = trackChangesHelpers.getChangesByUser( - editor.state, - 'john@company.com' -); +### View modes -// Check state -const isTracking = trackChangesHelpers.isTrackingEnabled(editor.state); +```javascript +// Show document as it was before changes +editor.commands.toggleTrackChangesShowOriginal() +editor.commands.enableTrackChangesShowOriginal() +editor.commands.disableTrackChangesShowOriginal() + +// Show document as if all changes were accepted +editor.commands.toggleTrackChangesShowFinal() +editor.commands.enableTrackChangesShowFinal() ``` - +## Helpers + +```javascript +import { trackChangesHelpers } from 'superdoc'; + +// Get all tracked changes in the document +const changes = trackChangesHelpers.getTrackChanges(editor.state); +// Returns: [{ mark, from, to }, ...] + +// Get a specific change by ID +const change = trackChangesHelpers.getTrackChanges(editor.state, 'change-123'); +``` ## Change types -- **Insertions** - Green underline -- **Deletions** - Red strikethrough -- **Format changes** - Yellow highlight +| Type | Mark | Visual | +|------|------|--------| +| Insertion | `trackInsert` | Green underline | +| Deletion | `trackDelete` | Red strikethrough | +| Format change | `trackFormat` | Records before/after formatting | -Each change includes: -- User information -- Timestamp -- Unique ID +Each change includes author name, email, timestamp, and a unique ID. ## Export behavior Changes export to DOCX as Word revisions: ```javascript -// With changes +// Export with changes preserved await superdoc.export(); -// Accept all first -editor.commands.acceptAllChanges(); +// Accept all first, then export clean +editor.commands.acceptAllTrackedChanges(); await superdoc.export(); ``` + +## Source code + +import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' + + From dbf63eb49593a65376d7c957bc81002c7088d1a0 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 11:57:16 -0300 Subject: [PATCH 42/45] docs(extensions): add missing commands, shortcuts, and attributes to 12 extension pages SD-1572: Added missing API surface that existed in code but was undocumented. Also removed phantom options, attributes, and types that don't exist in the actual extensions. --- apps/docs/extensions/bold.mdx | 30 ++++++--- apps/docs/extensions/document.mdx | 20 ++++++ apps/docs/extensions/format-commands.mdx | 20 ++++++ apps/docs/extensions/image.mdx | 8 +++ apps/docs/extensions/italic.mdx | 28 +++++++-- apps/docs/extensions/page-number.mdx | 3 +- apps/docs/extensions/paragraph.mdx | 69 +++++++++------------ apps/docs/extensions/search.mdx | 11 +++- apps/docs/extensions/structured-content.mdx | 58 +++++++++++++++++ apps/docs/extensions/table.mdx | 21 +++++++ apps/docs/extensions/text-style.mdx | 30 +++------ apps/docs/extensions/underline.mdx | 6 +- 12 files changed, 224 insertions(+), 80 deletions(-) diff --git a/apps/docs/extensions/bold.mdx b/apps/docs/extensions/bold.mdx index 2968dd1c98..f60499821c 100644 --- a/apps/docs/extensions/bold.mdx +++ b/apps/docs/extensions/bold.mdx @@ -8,21 +8,31 @@ import Description from '/snippets/extensions/bold.mdx' -## Options +## Commands -Configure the extension behavior: +### `setBold` - - HTML attributes for the strong element - +Apply bold formatting to the current selection. -## Attributes +```javascript +editor.commands.setBold() +``` -Node attributes that can be set and retrieved: +### `unsetBold` - - Bold weight value ('0' renders as normal) - +Remove bold formatting from the current selection. + +```javascript +editor.commands.unsetBold() +``` + +### `toggleBold` + +Toggle bold formatting on the current selection. + +```javascript +editor.commands.toggleBold() +``` ## Keyboard shortcuts diff --git a/apps/docs/extensions/document.mdx b/apps/docs/extensions/document.mdx index 932b91d5e0..d34b074827 100644 --- a/apps/docs/extensions/document.mdx +++ b/apps/docs/extensions/document.mdx @@ -40,6 +40,26 @@ Replaces all content with an empty paragraph editor.commands.clearDocument() ``` +### `setSectionPageMarginsAtSelection` + +Set page margins for the section at the current cursor position. + +**Example:** + +```javascript +editor.commands.setSectionPageMarginsAtSelection({ + topInches: 1, + rightInches: 1, + bottomInches: 1, + leftInches: 1 +}) +``` + +**Parameters:** + + + Object with optional `topInches`, `rightInches`, `bottomInches`, `leftInches` (numbers in inches) + ## Source code diff --git a/apps/docs/extensions/format-commands.mdx b/apps/docs/extensions/format-commands.mdx index 70df5a69b7..e55b3756fc 100644 --- a/apps/docs/extensions/format-commands.mdx +++ b/apps/docs/extensions/format-commands.mdx @@ -66,6 +66,26 @@ Works like format painter - first click copies, second click applies editor.commands.copyFormat() ``` +### `toggleMarkCascade` + +Toggle a mark type with cascade behavior, handling nested marks and negation attributes. Used internally by formatting extensions (bold, italic, etc.) but can be called directly for custom mark toggling. + +**Example:** + +```javascript +editor.commands.toggleMarkCascade('bold') +editor.commands.toggleMarkCascade('italic', { extendEmptyMarkRange: true }) +``` + +**Parameters:** + + + Name of the mark type to toggle + + + Options with `negationAttrs`, `isNegation`, `styleDetector`, and `extendEmptyMarkRange` + + ## Keyboard shortcuts | Command | Shortcut | Description | diff --git a/apps/docs/extensions/image.mdx b/apps/docs/extensions/image.mdx index a05ffde9e9..ad873e35f3 100644 --- a/apps/docs/extensions/image.mdx +++ b/apps/docs/extensions/image.mdx @@ -84,6 +84,14 @@ Node attributes that can be set and retrieved: Custom inline CSS styles
    + + Text wrapping configuration. The `type` property controls wrapping mode (e.g., `'Inline'`, `'Square'`, `'Tight'`, `'TopAndBottom'`, `'None'`). + + + + Transform data for rotation, flips, and size extension. Supports `rotation` (degrees), `flipH` (horizontal flip), `flipV` (vertical flip), and `sizeExtension` properties. + + ## Commands ### `setImage` diff --git a/apps/docs/extensions/italic.mdx b/apps/docs/extensions/italic.mdx index 96960dc855..90ca736319 100644 --- a/apps/docs/extensions/italic.mdx +++ b/apps/docs/extensions/italic.mdx @@ -8,13 +8,31 @@ import Description from '/snippets/extensions/italic.mdx' -## Options +## Commands -Configure the extension behavior: +### `setItalic` - - HTML attributes for italic elements - +Apply italic formatting to the current selection. + +```javascript +editor.commands.setItalic() +``` + +### `unsetItalic` + +Remove italic formatting from the current selection. + +```javascript +editor.commands.unsetItalic() +``` + +### `toggleItalic` + +Toggle italic formatting on the current selection. + +```javascript +editor.commands.toggleItalic() +``` ## Keyboard shortcuts diff --git a/apps/docs/extensions/page-number.mdx b/apps/docs/extensions/page-number.mdx index 8d3d0ffaa5..8848702b20 100644 --- a/apps/docs/extensions/page-number.mdx +++ b/apps/docs/extensions/page-number.mdx @@ -54,7 +54,8 @@ editor.commands.addTotalPageCount() | Command | Shortcut | Description | |---------|----------|-------------| -| addAutoPageNumber() | `⌘/Ctrl-Shift-alt-p` | Insert page number | +| addAutoPageNumber() | `⌘/Ctrl-Shift-Alt-p` | Insert page number | +| addTotalPageCount() | `⌘/Ctrl-Shift-Alt-c` | Insert total page count | ## Source code diff --git a/apps/docs/extensions/paragraph.mdx b/apps/docs/extensions/paragraph.mdx index b4b939e2a3..6abee0474c 100644 --- a/apps/docs/extensions/paragraph.mdx +++ b/apps/docs/extensions/paragraph.mdx @@ -8,58 +8,49 @@ import Description from '/snippets/extensions/paragraph.mdx' -## Options +## Commands -Configure the extension behavior: +### `toggleBulletList` - - Supported heading levels - +Convert selected paragraphs to a bullet list, or remove list formatting if already a bullet list. - - HTML attributes for paragraph elements - +```javascript +editor.commands.toggleBulletList() +``` -## Attributes +### `toggleOrderedList` -Node attributes that can be set and retrieved: +Convert selected paragraphs to an ordered list, or remove list formatting if already an ordered list. - - Paragraph spacing configuration - +```javascript +editor.commands.toggleOrderedList() +``` - - Additional HTML attributes - +### `restartNumbering` - - Text formatting marks - +Reset list numbering for the current list item and following items. - - Indentation settings - +```javascript +editor.commands.restartNumbering() +``` - - Paragraph borders - +## Keyboard shortcuts - - CSS class name - +| Command | Shortcut | Description | +|---------|----------|-------------| +| toggleOrderedList() | `Mod-Shift-7` | Toggle ordered list | +| toggleBulletList() | `Mod-Shift-8` | Toggle bullet list | +| (split paragraph) | `Enter` | Split paragraph at cursor | +| (line break) | `Shift-Enter` | Insert line break without list properties | +| (indent) | `Tab` | Increase list indent level | +| (outdent) | `Shift-Tab` | Decrease list indent level | - - Linked style identifier - - - - Text justification - - - - Tab stop positions - +## Input rules +| Trigger | Result | +|---------|--------| +| `- `, `+ `, or `* ` at line start | Create bullet list | +| `1. ` (or any number) at line start | Create ordered list | ## Source code diff --git a/apps/docs/extensions/search.mdx b/apps/docs/extensions/search.mdx index d65716f536..7e3e96a700 100644 --- a/apps/docs/extensions/search.mdx +++ b/apps/docs/extensions/search.mdx @@ -42,7 +42,16 @@ const regexMatches = editor.commands.search(/test/i) **Parameters:** - Search string or pattern + Search string, regex, or regex shorthand (e.g., `'/pattern/flags'`) + + + Optional settings + + + Apply CSS highlight classes to matches + + + Maximum number of matches to return ### `goToSearchResult` diff --git a/apps/docs/extensions/structured-content.mdx b/apps/docs/extensions/structured-content.mdx index 613df17216..244a33d771 100644 --- a/apps/docs/extensions/structured-content.mdx +++ b/apps/docs/extensions/structured-content.mdx @@ -109,6 +109,44 @@ Removes a structured content by ID. Removes a structured content at cursor, preserving its content. +### `updateStructuredContentByGroup` + +Update all structured content fields that share the same group identifier. + +**Example:** + +```javascript +editor.commands.updateStructuredContentByGroup('pricing', { + text: '$99.00' +}) +``` + +**Parameters:** + + + Group identifier to match + + + Update options (same as `updateStructuredContentById`) + + +### `deleteStructuredContentByGroup` + +Remove all structured content fields that share the same group identifier. + +**Example:** + +```javascript +editor.commands.deleteStructuredContentByGroup('pricing') +editor.commands.deleteStructuredContentByGroup(['pricing', 'deprecated']) +``` + +**Parameters:** + + + Group identifier or array of group identifiers + + ### `appendRowsToStructuredContentTable` Append multiple rows to the end of a table inside a structured content block. @@ -191,6 +229,26 @@ console.log(`Block contains ${tables.length} table(s)`);
    +### `getStructuredContentByGroup` + +Find all structured content nodes that share the same group identifier. + +**Example:** + +```javascript +const fields = editor.helpers.getStructuredContentByGroup('pricing', editor.state); +fields.forEach(({ node, pos }) => { + console.log(node.attrs.tag, pos); +}); +``` + +**Parameters:** + + + Group identifier or array of group identifiers + + + ### `getStructuredContentTags` Get all structured content tags (inline and block) in the document diff --git a/apps/docs/extensions/table.mdx b/apps/docs/extensions/table.mdx index 43767992a3..2194bc6962 100644 --- a/apps/docs/extensions/table.mdx +++ b/apps/docs/extensions/table.mdx @@ -368,6 +368,25 @@ editor.commands.setCellBackground('ff0000') Color value (hex with or without #)
    +### `appendRowsWithContent` + +Append rows with content to an existing table. + +**Example:** + +```javascript +editor.commands.appendRowsWithContent({ + valueRows: [['Cell A', 'Cell B'], ['Cell C', 'Cell D']], + copyRowStyle: true +}) +``` + +**Parameters:** + + + Object with `tablePos`, `tableNode`, `valueRows` (array of row arrays), and optional `copyRowStyle` boolean + + ### `deleteCellAndTableBorders` Remove all borders from table and its cells @@ -391,7 +410,9 @@ editor.commands.deleteCellAndTableBorders() | goToNextCell/addRowAfter() | `Tab` | Navigate to next cell or add row | | goToPreviousCell() | `Shift-Tab` | Navigate to previous cell | | deleteTableWhenSelected() | `Backspace` | Delete table when all cells selected | +| deleteTableWhenSelected() | `Mod-Backspace` | Delete table when all cells selected | | deleteTableWhenSelected() | `Delete` | Delete table when all cells selected | +| deleteTableWhenSelected() | `Mod-Delete` | Delete table when all cells selected | ## Types diff --git a/apps/docs/extensions/text-style.mdx b/apps/docs/extensions/text-style.mdx index f79c882f3f..8517fadc42 100644 --- a/apps/docs/extensions/text-style.mdx +++ b/apps/docs/extensions/text-style.mdx @@ -18,10 +18,14 @@ Configure the extension behavior: ## Attributes -Node attributes that can be set and retrieved: +Mark attributes that can be set and retrieved: - - Style identifier for referencing predefined styles + + Vertical alignment for superscript and subscript. Values: `'superscript'`, `'subscript'`, `'baseline'` + + + + Custom vertical position offset in points (e.g., `'2pt'`, `'-1.5pt'`). Takes precedence over `vertAlign` when both are present. ## Commands @@ -40,26 +44,6 @@ Automatically checks if any style attributes exist before removal editor.commands.removeEmptyTextStyle() ``` -## Types - -### `ParentNodeInfo` - - - - The position of the parent node. - - - The start position of the parent node. - - - The depth of the parent node. - - - The parent node. - - - - ## Source code import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' diff --git a/apps/docs/extensions/underline.mdx b/apps/docs/extensions/underline.mdx index d774b1cee3..7481b82205 100644 --- a/apps/docs/extensions/underline.mdx +++ b/apps/docs/extensions/underline.mdx @@ -18,12 +18,16 @@ Configure the extension behavior: ## Attributes -Node attributes that can be set and retrieved: +Mark attributes that can be set and retrieved: Style of underline + + Color of the underline (hex color value) + + ## Commands ### `setUnderline` From 0db6df654eef422b8af34005a484f281aa7e24bf Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 12:19:35 -0300 Subject: [PATCH 43/45] docs(extensions): add pages for bookmarks, footnote, TOC, document-index, permission-ranges SD-1572: Created extension pages for 5 previously undocumented extensions and added them to the docs navigation. Bookmarks has full command documentation; the others document Word compatibility behavior. --- apps/docs/docs.json | 5 ++ apps/docs/extensions/bookmarks.mdx | 68 +++++++++++++++++++ apps/docs/extensions/document-index.mdx | 50 ++++++++++++++ apps/docs/extensions/footnote.mdx | 36 ++++++++++ apps/docs/extensions/permission-ranges.mdx | 54 +++++++++++++++ apps/docs/extensions/table-of-contents.mdx | 38 +++++++++++ .../snippets/extensions/document-index.mdx | 3 + apps/docs/snippets/extensions/footnote.mdx | 3 + .../snippets/extensions/permission-ranges.mdx | 3 + .../snippets/extensions/table-of-contents.mdx | 3 + 10 files changed, 263 insertions(+) create mode 100644 apps/docs/extensions/bookmarks.mdx create mode 100644 apps/docs/extensions/document-index.mdx create mode 100644 apps/docs/extensions/footnote.mdx create mode 100644 apps/docs/extensions/permission-ranges.mdx create mode 100644 apps/docs/extensions/table-of-contents.mdx create mode 100644 apps/docs/snippets/extensions/document-index.mdx create mode 100644 apps/docs/snippets/extensions/footnote.mdx create mode 100644 apps/docs/snippets/extensions/permission-ranges.mdx create mode 100644 apps/docs/snippets/extensions/table-of-contents.mdx diff --git a/apps/docs/docs.json b/apps/docs/docs.json index 61a983c2f8..637a147324 100644 --- a/apps/docs/docs.json +++ b/apps/docs/docs.json @@ -116,14 +116,17 @@ "pages": [ "extensions/block-node", "extensions/bold", + "extensions/bookmarks", "extensions/bullet-list", "extensions/color", "extensions/content-block", "extensions/custom-selection", "extensions/document", + "extensions/document-index", "extensions/dropcursor", "extensions/font-family", "extensions/font-size", + "extensions/footnote", "extensions/format-commands", "extensions/gapcursor", "extensions/heading", @@ -141,6 +144,7 @@ "extensions/ordered-list", "extensions/page-number", "extensions/paragraph", + "extensions/permission-ranges", "extensions/placeholder", "extensions/popover-plugin", "extensions/run-item", @@ -154,6 +158,7 @@ "extensions/table", "extensions/table-cell", "extensions/table-header", + "extensions/table-of-contents", "extensions/table-row", "extensions/text-align", "extensions/text-indent", diff --git a/apps/docs/extensions/bookmarks.mdx b/apps/docs/extensions/bookmarks.mdx new file mode 100644 index 0000000000..7fd120f68e --- /dev/null +++ b/apps/docs/extensions/bookmarks.mdx @@ -0,0 +1,68 @@ +--- +title: Bookmarks extension +sidebarTitle: "Bookmarks" +keywords: "Bookmarks extension, superdoc Bookmarks, word Bookmarks, document Bookmarks, docx Bookmarks" +--- + +import Description from '/snippets/extensions/bookmarks.mdx' + + + +## Commands + +### `insertBookmark` + +Insert a bookmark at the current cursor position. Bookmarks are invisible navigation anchors used for cross-references and document navigation. + +**Example:** + +```javascript +editor.commands.insertBookmark({ name: 'chapter1' }) +editor.commands.insertBookmark({ name: 'introduction', id: 'intro-001' }) +``` + +**Parameters:** + + + Object with `name` (required bookmark name) and optional `id` (unique identifier) + + +### `goToBookmark` + +Navigate to a bookmark by name. Scrolls the document to the bookmark position. + +**Example:** + +```javascript +editor.commands.goToBookmark('chapter1') +``` + +**Parameters:** + + + Bookmark name to navigate to + + +## Attributes + +### BookmarkStart + + + Bookmark name for cross-references and navigation + + + + Unique identifier for the bookmark + + +### BookmarkEnd + + + Identifier matching the corresponding bookmarkStart + + +## Source code + +import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' + + diff --git a/apps/docs/extensions/document-index.mdx b/apps/docs/extensions/document-index.mdx new file mode 100644 index 0000000000..570a902445 --- /dev/null +++ b/apps/docs/extensions/document-index.mdx @@ -0,0 +1,50 @@ +--- +title: Document Index extension +sidebarTitle: "Document Index" +keywords: "Document Index extension, superdoc Document Index, word Document Index, document index, docx index, index entry" +--- + +import Description from '/snippets/extensions/document-index.mdx' + + + + +Document indexes and index entries are managed automatically during Word document import and export. There are no commands to programmatically create or update indexes. + + +## How it works + +The document index system consists of two node types: + +- **Index block** — A block node that contains the rendered index (alphabetical listing of terms with page references) +- **Index entry** — An invisible inline marker placed throughout the document text to mark terms for inclusion in the index + +## Word export + +Indexes export as Word field codes: + +```xml + + + + INDEX \l "1" + + + + + + + + + XE "Primary Entry" + + + + +``` + +## Source code + +import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' + + diff --git a/apps/docs/extensions/footnote.mdx b/apps/docs/extensions/footnote.mdx new file mode 100644 index 0000000000..6b95415148 --- /dev/null +++ b/apps/docs/extensions/footnote.mdx @@ -0,0 +1,36 @@ +--- +title: Footnote extension +sidebarTitle: "Footnote" +keywords: "Footnote extension, superdoc Footnote, word Footnote, document Footnote, docx Footnote" +--- + +import Description from '/snippets/extensions/footnote.mdx' + + + + +Footnote references are managed automatically during Word document import and export. There are no commands to programmatically create footnotes. + + +## Word export + +Footnote references export as native Word footnotes: + +```xml + + + + + + + + Footnote text content + + +``` + +## Source code + +import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' + + diff --git a/apps/docs/extensions/permission-ranges.mdx b/apps/docs/extensions/permission-ranges.mdx new file mode 100644 index 0000000000..aa3387042e --- /dev/null +++ b/apps/docs/extensions/permission-ranges.mdx @@ -0,0 +1,54 @@ +--- +title: Permission Ranges extension +sidebarTitle: "Permission Ranges" +keywords: "Permission Ranges extension, superdoc Permission Ranges, word Permission Ranges, document protection, docx permission" +--- + +import Description from '/snippets/extensions/permission-ranges.mdx' + + + +## How it works + +Permission ranges define editable regions within a protected Word document. The extension: + +1. Parses `permStart` and `permEnd` markers from the document +2. Matches the current user's email against the `ed` (specific editor) or `edGrp` (editor group) attributes +3. Allows edits only within matched permission ranges +4. Blocks edits outside permitted regions + +When a document is in viewing mode and has permission ranges matching the current user, the extension automatically enables editing within those ranges. + +## Permission matching + +Ranges can target specific users or groups: + +```xml + + + + + + + +``` + +The `ed` attribute uses the format `domain\username`, matched against the user email configured in SuperDoc. + +## Word export + +Permission ranges export as native Word permission markers: + +```xml + + + Editable content here + + +``` + +## Source code + +import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' + + diff --git a/apps/docs/extensions/table-of-contents.mdx b/apps/docs/extensions/table-of-contents.mdx new file mode 100644 index 0000000000..8d144241b0 --- /dev/null +++ b/apps/docs/extensions/table-of-contents.mdx @@ -0,0 +1,38 @@ +--- +title: Table of Contents extension +sidebarTitle: "Table of Contents" +keywords: "Table of Contents extension, superdoc Table of Contents, word Table of Contents, document Table of Contents, docx Table of Contents, TOC" +--- + +import Description from '/snippets/extensions/table-of-contents.mdx' + + + + +Table of contents blocks are managed automatically during Word document import and export. There are no commands to programmatically create or update a TOC. + + +## Word export + +Tables of contents export as Word structured document tags with field instructions: + +```xml + + + + + + + + TOC \o "1-3" + + + + +``` + +## Source code + +import { SourceCodeLink } from '/snippets/components/source-code-link.jsx' + + diff --git a/apps/docs/snippets/extensions/document-index.mdx b/apps/docs/snippets/extensions/document-index.mdx new file mode 100644 index 0000000000..efd790b35d --- /dev/null +++ b/apps/docs/snippets/extensions/document-index.mdx @@ -0,0 +1,3 @@ +Display Word-generated document indexes with alphabetical term listings. + +Document indexes imported from Word render as block elements containing the original index entries. Index entry markers (invisible inline nodes) mark terms throughout the document for inclusion in the index. diff --git a/apps/docs/snippets/extensions/footnote.mdx b/apps/docs/snippets/extensions/footnote.mdx new file mode 100644 index 0000000000..9074812236 --- /dev/null +++ b/apps/docs/snippets/extensions/footnote.mdx @@ -0,0 +1,3 @@ +Render Word footnote references as superscript markers with automatic numbering. + +Footnotes imported from Word documents display as clickable superscript numbers (e.g., 1, 2) that correspond to footnote content at the bottom of the page. diff --git a/apps/docs/snippets/extensions/permission-ranges.mdx b/apps/docs/snippets/extensions/permission-ranges.mdx new file mode 100644 index 0000000000..19476e75ac --- /dev/null +++ b/apps/docs/snippets/extensions/permission-ranges.mdx @@ -0,0 +1,3 @@ +Control which document regions are editable based on user permissions from Word permission ranges. + +When a Word document contains permission ranges (`w:permStart`/`w:permEnd`), SuperDoc automatically restricts editing to the allowed regions for the current user. diff --git a/apps/docs/snippets/extensions/table-of-contents.mdx b/apps/docs/snippets/extensions/table-of-contents.mdx new file mode 100644 index 0000000000..eab6a4b660 --- /dev/null +++ b/apps/docs/snippets/extensions/table-of-contents.mdx @@ -0,0 +1,3 @@ +Display Word-generated tables of contents with heading hierarchy preservation. + +Tables of contents imported from Word documents render as block elements containing the original TOC paragraphs and page references. From 8d23425aaee214b030f4c47aec451328934ccff2 Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 12:21:46 -0300 Subject: [PATCH 44/45] docs: update GitHub URL to superdoc-dev/superdoc Replace Harbour-Enterprises/SuperDoc with superdoc-dev/superdoc across all 17 documentation files. --- apps/docs/ai/ai-builder/overview.mdx | 2 +- apps/docs/api-reference/introduction.mdx | 2 +- apps/docs/docs.json | 2 +- apps/docs/getting-started/frameworks/react.mdx | 2 +- apps/docs/getting-started/frameworks/vue.mdx | 2 +- apps/docs/getting-started/introduction.mdx | 2 +- apps/docs/guides/collaboration/hocuspocus.mdx | 2 +- apps/docs/guides/collaboration/liveblocks.mdx | 2 +- apps/docs/guides/collaboration/superdoc-yjs.mdx | 4 ++-- apps/docs/guides/collaboration/tiptap-cloud.mdx | 2 +- apps/docs/guides/collaboration/y-sweet.mdx | 2 +- apps/docs/guides/migration/prosemirror.mdx | 2 +- apps/docs/modules/collaboration/quickstart.mdx | 2 +- apps/docs/openapi.json | 2 +- apps/docs/resources/license.mdx | 4 ++-- apps/docs/scripts/sync-api-docs.js | 2 +- apps/docs/snippets/components/source-code-link.jsx | 2 +- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/apps/docs/ai/ai-builder/overview.mdx b/apps/docs/ai/ai-builder/overview.mdx index 9681924252..d9928a00c8 100644 --- a/apps/docs/ai/ai-builder/overview.mdx +++ b/apps/docs/ai/ai-builder/overview.mdx @@ -23,4 +23,4 @@ See the [AI Actions Quick Start](/ai/ai-actions/overview#quick-start) to get sta ## Get notified -Want to be notified when AI Builder launches? [Join Discord](https://discord.com/invite/b9UuaZRyaB) or [watch on GitHub](https://github.com/Harbour-Enterprises/SuperDoc). +Want to be notified when AI Builder launches? [Join Discord](https://discord.com/invite/b9UuaZRyaB) or [watch on GitHub](https://github.com/superdoc-dev/superdoc). diff --git a/apps/docs/api-reference/introduction.mdx b/apps/docs/api-reference/introduction.mdx index 245a0db1ca..c91d197ee9 100644 --- a/apps/docs/api-reference/introduction.mdx +++ b/apps/docs/api-reference/introduction.mdx @@ -70,4 +70,4 @@ Your Word documents work because SuperDoc was built for Word documents. Not mark ## Resources **[Status Page](https://status.superdoc.dev)** - Uptime and incidents -**[GitHub](https://github.com/Harbour-Enterprises/SuperDoc)** - Examples and issues +**[GitHub](https://github.com/superdoc-dev/superdoc)** - Examples and issues diff --git a/apps/docs/docs.json b/apps/docs/docs.json index 637a147324..9795f1e8a4 100644 --- a/apps/docs/docs.json +++ b/apps/docs/docs.json @@ -265,7 +265,7 @@ "links": [ { "type": "button", - "href": "https://github.com/Harbour-Enterprises/SuperDoc", + "href": "https://github.com/superdoc-dev/superdoc", "label": "", "icon": "github" }, diff --git a/apps/docs/getting-started/frameworks/react.mdx b/apps/docs/getting-started/frameworks/react.mdx index 7c32b7f15e..91a1895701 100644 --- a/apps/docs/getting-started/frameworks/react.mdx +++ b/apps/docs/getting-started/frameworks/react.mdx @@ -265,4 +265,4 @@ function useSuperDoc(config) { - [Vue Integration](/getting-started/frameworks/vue) - Vue setup - [API Reference](/core/superdoc/configuration) - Configuration options -- [Examples](https://github.com/Harbour-Enterprises/SuperDoc/tree/main/examples/react-example) - Working examples +- [Examples](https://github.com/superdoc-dev/superdoc/tree/main/examples/react-example) - Working examples diff --git a/apps/docs/getting-started/frameworks/vue.mdx b/apps/docs/getting-started/frameworks/vue.mdx index e05ff84821..3f16c54761 100644 --- a/apps/docs/getting-started/frameworks/vue.mdx +++ b/apps/docs/getting-started/frameworks/vue.mdx @@ -204,4 +204,4 @@ defineExpose({ - [React Integration](/getting-started/frameworks/react) - React setup - [API Reference](/core/superdoc/configuration) - Configuration options -- [Examples](https://github.com/Harbour-Enterprises/SuperDoc/tree/main/examples/vue-example) - Working examples \ No newline at end of file +- [Examples](https://github.com/superdoc-dev/superdoc/tree/main/examples/vue-example) - Working examples \ No newline at end of file diff --git a/apps/docs/getting-started/introduction.mdx b/apps/docs/getting-started/introduction.mdx index d0905f4f44..1517f9fdaa 100644 --- a/apps/docs/getting-started/introduction.mdx +++ b/apps/docs/getting-started/introduction.mdx @@ -38,7 +38,7 @@ A JavaScript library that renders and edits Word documents in the browser. Comme Working demos and templates diff --git a/apps/docs/guides/collaboration/hocuspocus.mdx b/apps/docs/guides/collaboration/hocuspocus.mdx index b5530a1bda..a781cd247e 100644 --- a/apps/docs/guides/collaboration/hocuspocus.mdx +++ b/apps/docs/guides/collaboration/hocuspocus.mdx @@ -275,7 +275,7 @@ Server.configure({ Complete source code diff --git a/apps/docs/guides/collaboration/liveblocks.mdx b/apps/docs/guides/collaboration/liveblocks.mdx index 71eef37a5e..568b31555d 100644 --- a/apps/docs/guides/collaboration/liveblocks.mdx +++ b/apps/docs/guides/collaboration/liveblocks.mdx @@ -229,7 +229,7 @@ useEffect(() => { Complete source code diff --git a/apps/docs/guides/collaboration/superdoc-yjs.mdx b/apps/docs/guides/collaboration/superdoc-yjs.mdx index 0fd39dda19..9df308e9d1 100644 --- a/apps/docs/guides/collaboration/superdoc-yjs.mdx +++ b/apps/docs/guides/collaboration/superdoc-yjs.mdx @@ -353,7 +353,7 @@ fastify.get('/health', (request, reply) => { Complete working example @@ -361,7 +361,7 @@ fastify.get('/health', (request, reply) => { Fastify server setup diff --git a/apps/docs/guides/collaboration/tiptap-cloud.mdx b/apps/docs/guides/collaboration/tiptap-cloud.mdx index 15a4ca0ca5..694fd92db0 100644 --- a/apps/docs/guides/collaboration/tiptap-cloud.mdx +++ b/apps/docs/guides/collaboration/tiptap-cloud.mdx @@ -188,7 +188,7 @@ superdoc.destroy(); Complete source code diff --git a/apps/docs/guides/collaboration/y-sweet.mdx b/apps/docs/guides/collaboration/y-sweet.mdx index de7a6f75c5..13121623db 100644 --- a/apps/docs/guides/collaboration/y-sweet.mdx +++ b/apps/docs/guides/collaboration/y-sweet.mdx @@ -248,7 +248,7 @@ For production, consider: Complete source code diff --git a/apps/docs/guides/migration/prosemirror.mdx b/apps/docs/guides/migration/prosemirror.mdx index cb3611e0bd..25bf09164c 100644 --- a/apps/docs/guides/migration/prosemirror.mdx +++ b/apps/docs/guides/migration/prosemirror.mdx @@ -60,6 +60,6 @@ If you need features SuperDoc doesn't provide, you have limited options: ## Need help? -- [GitHub Issues](https://github.com/Harbour-Enterprises/SuperDoc/issues) +- [GitHub Issues](https://github.com/superdoc-dev/superdoc/issues) - [Discord Community](https://discord.com/invite/b9UuaZRyaB) - Email: q@superdoc.dev diff --git a/apps/docs/modules/collaboration/quickstart.mdx b/apps/docs/modules/collaboration/quickstart.mdx index 626f918a68..0931d06bfb 100644 --- a/apps/docs/modules/collaboration/quickstart.mdx +++ b/apps/docs/modules/collaboration/quickstart.mdx @@ -268,7 +268,7 @@ const client = createClient({ Complete source code on GitHub diff --git a/apps/docs/openapi.json b/apps/docs/openapi.json index 2ddf92d9dd..d6b1e41a79 100644 --- a/apps/docs/openapi.json +++ b/apps/docs/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "SuperDoc API", "version": "0.9.0", - "description": "## Quick Start\n\n1 - **Register**: https://api.superdoc.dev/v1/auth/register?email=you@email.com\n\n2 - **Verify**: Check email, then https://api.superdoc.dev/v1/auth/verify?email=you@email.com&code=123456\n\n3 - **Convert**\n```bash\ncurl -X POST https://api.superdoc.dev/v1/convert?from=docx \\\n -H \"Authorization: Bearer YOUR_API_KEY\" \\\n -F \"file=@document.docx\" \\\n -o converted.pdf\n```\n\n\nOr use our Playground:\nhttps://api.superdoc.dev/docs/#tag/documents/post/v1/convert\n\nThat's it! Your DOCX is now a PDF.\n\n---\n\n[Status](https://status.superdoc.dev) • [GitHub](https://github.com/Harbour-Enterprises/SuperDoc)", + "description": "## Quick Start\n\n1 - **Register**: https://api.superdoc.dev/v1/auth/register?email=you@email.com\n\n2 - **Verify**: Check email, then https://api.superdoc.dev/v1/auth/verify?email=you@email.com&code=123456\n\n3 - **Convert**\n```bash\ncurl -X POST https://api.superdoc.dev/v1/convert?from=docx \\\n -H \"Authorization: Bearer YOUR_API_KEY\" \\\n -F \"file=@document.docx\" \\\n -o converted.pdf\n```\n\n\nOr use our Playground:\nhttps://api.superdoc.dev/docs/#tag/documents/post/v1/convert\n\nThat's it! Your DOCX is now a PDF.\n\n---\n\n[Status](https://status.superdoc.dev) • [GitHub](https://github.com/superdoc-dev/superdoc)", "contact": { "name": "Support", "email": "api@superdoc.dev", diff --git a/apps/docs/resources/license.mdx b/apps/docs/resources/license.mdx index 8ce4e83d82..729a9cc0fa 100644 --- a/apps/docs/resources/license.mdx +++ b/apps/docs/resources/license.mdx @@ -9,9 +9,9 @@ For questions about licensing, please contact [q@superdoc.dev](mailto:q@superdoc Contributions are welcome. Here's how you can help: -1. Check the [issue tracker](https://github.com/Harbour-Enterprises/SuperDoc/issues) for open issues +1. Check the [issue tracker](https://github.com/superdoc-dev/superdoc/issues) for open issues 2. Fork the repository and create a feature/bugfix branch 3. Write clear, documented code following the style guidelines 4. Submit a PR with a detailed description of your changes -See the [Contributing Guide](https://github.com/Harbour-Enterprises/SuperDoc/blob/main/CONTRIBUTING.md) for more details. +See the [Contributing Guide](https://github.com/superdoc-dev/superdoc/blob/main/CONTRIBUTING.md) for more details. diff --git a/apps/docs/scripts/sync-api-docs.js b/apps/docs/scripts/sync-api-docs.js index 9fa68ee051..f31ab67bee 100755 --- a/apps/docs/scripts/sync-api-docs.js +++ b/apps/docs/scripts/sync-api-docs.js @@ -6,7 +6,7 @@ const https = require('https'); function fetchOpenAPI() { return new Promise((resolve, reject) => { https - .get('https://raw.githubusercontent.com/Harbour-Enterprises/SuperDoc-API/main/openapi.yaml', (res) => { + .get('https://raw.githubusercontent.com/superdoc-dev/superdoc-API/main/openapi.yaml', (res) => { let data = ''; res.on('data', (chunk) => (data += chunk)); res.on('end', () => resolve(data)); diff --git a/apps/docs/snippets/components/source-code-link.jsx b/apps/docs/snippets/components/source-code-link.jsx index 51b3da5130..cead8356cb 100644 --- a/apps/docs/snippets/components/source-code-link.jsx +++ b/apps/docs/snippets/components/source-code-link.jsx @@ -1,7 +1,7 @@ export const SourceCodeLink = ({ extension, path }) => { // Default to standard extension path if no custom path provided const githubPath = path || `packages/super-editor/src/extensions/${extension.toLowerCase()}`; - const githubUrl = `https://github.com/Harbour-Enterprises/SuperDoc/tree/main/${githubPath}`; + const githubUrl = `https://github.com/superdoc-dev/superdoc/tree/main/${githubPath}`; return (
    From 4ce90f76c42b58d39d420330e1727e182cb4c1be Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Fri, 6 Feb 2026 12:30:20 -0300 Subject: [PATCH 45/45] chore: updated badge --- apps/docs/docs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/docs/docs.json b/apps/docs/docs.json index 9795f1e8a4..51318e68d1 100644 --- a/apps/docs/docs.json +++ b/apps/docs/docs.json @@ -67,6 +67,7 @@ "pages": [ { "group": "SuperDoc", + "tag": "UDPATED", "pages": [ "core/superdoc/overview", "core/superdoc/configuration", @@ -76,6 +77,7 @@ }, { "group": "SuperEditor", + "tag": "UDPATED", "pages": [ "core/supereditor/overview", "core/supereditor/configuration", @@ -185,7 +187,6 @@ }, { "group": "Template Builder", - "tag": "NEW", "pages": [ "solutions/template-builder/introduction", "solutions/template-builder/quickstart",