Skip to content

Add Side-by-Side Comparison sample for TypeScript DOCX Editor - #10

Open
suriyaprakasamr wants to merge 4 commits into
masterfrom
bc/b38f245d-reference-already
Open

suriyaprakasamr wants to merge 4 commits into
masterfrom
bc/b38f245d-reference-already

Conversation

@suriyaprakasamr

Copy link
Copy Markdown
Collaborator

📍 Agent Session: View Full Session | 👤 Requested by: @suriyaprakasamr | 🤖 Agent: Agent

📋 Task Context

Add a new sample under Side-by-Side-Comparison/ that mirrors the React react-docx-editor-compare-documents sample, but built on the existing TypeScript DOCX Editor quickstart (webpack + DocumentEditorContainer). Users can upload an original and revised DOCX/SFDT file, compare them through the hosted Syncfusion Document Editor service, and review the tracked-changes result side-by-side with synchronized scrolling.

📝 Implementation Summary

Mirrors the React compare-documents sample using the Syncfusion TypeScript DOCX Editor (webpack + ts-loader). Two DocumentEditorContainer instances are mounted side-by-side. The user uploads an original and a revised DOCX/SFDT file, clicks Compare, and the sample calls the hosted Import and CompareDocuments web APIs. The original document is loaded in the left editor and the compared (or revised) document in the right editor, with synchronized scrolling and a revision-pane toggle. README is adapted from the React reference and points to TypeScript/ES6 documentation links.

Project layout

Path Purpose
Side-by-Side-Comparison/src/app/app.ts TypeScript entry point – wires up the two editors, the upload/compare UI, and synced scrolling.
Side-by-Side-Comparison/src/index.html HTML host.
Side-by-Side-Comparison/src/styles/styles.css Editor and UI styles.
Side-by-Side-Comparison/src/resources/favicon.ico Favicon (re-used from getting-started).
Side-by-Side-Comparison/webpack.config.js Webpack 5 configuration.
Side-by-Side-Comparison/tsconfig.json TypeScript configuration.
Side-by-Side-Comparison/gulpfile.js gulp tasks (e2e) – kept for parity with getting-started.
Side-by-Side-Comparison/package.json Uses latest @syncfusion/ej2-documenteditor and @syncfusion/ej2-tailwind3-theme packages.
Side-by-Side-Comparison/license Syncfusion license notice.
Side-by-Side-Comparison/README.md TypeScript-adapted README, modeled on the React sample's README.
Side-by-Side-Comparison/images/compare-documents-demo-typescript-docx-editor.png Demo image referenced from the README.

package-lock.json, node_modules/, and dist/ are intentionally not committed.

Build & verification status

Step Command Result
Install dependencies npm install added 882 packages, and audited 883 packages in 46s – exit 0
Production build npx webpack --mode production webpack 5.112.0 compiled with 3 warnings in 42320 ms – exit 0 (warnings are only the standard asset-size advisories from the full Syncfusion bundle)
TypeScript check npx tsc --noEmit exit 0
Dev server npx webpack serve --mode development Compiled successfully in 7.5 s and served from the configured port

Build artifacts produced in dist/:

Asset Size
bundle.js 6.29 MiB
bundle.css 3.51 MiB
index.html 650 bytes

🔍 Quality Checklist

  • Code follows project conventions
  • All tests pass
  • No security vulnerabilities introduced
  • Documentation updated (if applicable)
  • Breaking changes documented (if any)

View Full Session • Generated by Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant