Skip to content

Commit 9e0d3ce

Browse files
authored
feat(vscode-ext): add tests, enable comments, clean up extension (SD-2341) (#2558)
* feat(vscode-ext): enable comments bubble rendering Show Word document comments in the editor by passing comments: { visible: true } to the SuperDoc constructor. * fix(vscode-ext): allow comment and tracked change balloons to render Remove display:flex and justify-content:center from #superdoc container so SuperDoc's internal layout can allocate space for the right margin where comment bubbles and tracked change balloons appear. * docs(vscode-ext): add demo GIF and rewrite README for Marketplace Add animated demo showing AI-driven tracked changes via MCP. Rewrite README with badges, feature list, install instructions, and AI integration section. * chore(vscode-ext): add icon, homepage, and Marketplace metadata Add SuperDoc brand logo as extension icon, homepage link, bugs URL, gallery banner color, and additional keywords for discoverability. * chore(vscode-ext): remove demo GIF from git, host externally Remove demo.gif from repo to avoid bloating git history with a 6.8MB binary. Add to .gitignore and .vscodeignore. README will reference a GitHub-hosted URL once uploaded.
1 parent b9010a4 commit 9e0d3ce

7 files changed

Lines changed: 43 additions & 19 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,4 @@ packages/sdk/tools/*.json
107107
# deploys directly from git with no pre-build hook support.
108108

109109
.playwright-cli/
110+
apps/vscode-ext/demo.gif

apps/vscode-ext/.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ node_modules/**
1111
out/**
1212
!dist/**
1313
!webview/**
14+
demo.gif

apps/vscode-ext/README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
11
# SuperDoc for VS Code
22

3-
Open and edit `.docx` files directly in VS Code.
3+
[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/superdoc-dev.superdoc-vscode-ext)](https://marketplace.visualstudio.com/items?itemName=superdoc-dev.superdoc-vscode-ext)
4+
[![Installs](https://img.shields.io/visual-studio-marketplace/i/superdoc-dev.superdoc-vscode-ext)](https://marketplace.visualstudio.com/items?itemName=superdoc-dev.superdoc-vscode-ext)
45

5-
## Install
6+
Open, edit, and review Word documents directly in VS Code.
67

7-
Search for **SuperDoc** in the VS Code Extensions panel, or:
8+
![SuperDoc VS Code Extension Demo](https://github.com/user-attachments/assets/23dcf3b1-9b6e-4e77-a4f6-17dde9d25ebc)
89

9-
```bash
10-
code --install-extension superdoc-dev.superdoc-vscode-ext
11-
```
10+
## Features
1211

13-
Once installed, `.docx` files open with SuperDoc by default.
12+
- **Full DOCX rendering** — pagination, headings, tables, lists, signature blocks
13+
- **Edit in place** — type, format, and save without leaving VS Code
14+
- **Tracked changes** — AI agents can suggest edits as Word tracked changes
15+
- **Comments** — view and add Word comments with margin bubbles
16+
- **Live reload** — when an external process modifies the file, the document refreshes automatically
17+
- **Auto-save** — changes are saved as you type
18+
- **Context menu** — right-click any `.docx` in the Explorer and choose "Open with SuperDoc"
1419

15-
## Features
20+
## Install
21+
22+
Search **"SuperDoc"** in the VS Code Extensions panel, or:
23+
24+
```
25+
ext install superdoc-dev.superdoc-vscode-ext
26+
```
1627

17-
- **Real DOCX editing** — Formatting, tables, lists, headers — all preserved. No conversion to HTML or any intermediate format.
18-
- **Pagination and rulers** — Documents render with page breaks and ruler guides, just like Word.
19-
- **Auto-save** — Changes save automatically as you type.
20-
- **Live reload** — When an AI agent or external process modifies your file, the document refreshes instantly.
21-
- **Context menu** — Right-click any `.docx` in the Explorer and choose "Open with SuperDoc."
28+
Once installed, click any `.docx` file to open it with SuperDoc.
2229

23-
## How it works
30+
## AI Integration
2431

25-
SuperDoc renders documents directly from OOXML — the native format of `.docx` files. The extension bundles the full SuperDoc rendering and editing engine in a VS Code webview. No server calls. Your documents never leave your machine.
32+
SuperDoc provides an [MCP server](https://github.com/superdoc-dev/superdoc/tree/main/apps/mcp) that lets AI agents read, edit, and comment on Word documents programmatically. Combined with this extension, you get a live preview of AI-suggested changes — tracked changes and comments appear in real time as the agent works.
2633

2734
## Part of SuperDoc
2835

29-
This extension is part of [SuperDoc](https://github.com/superdoc-dev/superdoc) — open-source DOCX editing and tooling. Renders, edits, and automates .docx in the browser and on the server.
36+
This extension is powered by [SuperDoc](https://github.com/superdoc-dev/superdoc) — open-source DOCX editing for the browser and server. No server calls — your documents never leave your machine.
3037

3138
## License
3239

apps/vscode-ext/logo.png

-4.95 KB
Loading

apps/vscode-ext/package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,20 @@
44
"description": "Open and edit Word documents (.docx) directly in VS Code using SuperDoc",
55
"version": "2.0.0",
66
"publisher": "superdoc-dev",
7-
"repository": "https://github.com/superdoc-dev/superdoc",
7+
"icon": "logo.png",
8+
"homepage": "https://superdoc.dev",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/superdoc-dev/superdoc",
12+
"directory": "apps/vscode-ext"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/superdoc-dev/superdoc/issues"
16+
},
17+
"galleryBanner": {
18+
"color": "#0f172a",
19+
"theme": "dark"
20+
},
821
"engines": {
922
"vscode": "^1.107.0"
1023
},
@@ -17,6 +30,9 @@
1730
"word",
1831
"document",
1932
"editor",
33+
"office",
34+
"ooxml",
35+
"tracked changes",
2036
"superdoc"
2137
],
2238
"main": "./dist/extension.js",

apps/vscode-ext/webview/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ function initializeEditor(fileArrayBuffer) {
9898
documentMode: 'editing',
9999
pagination: true,
100100
rulers: true,
101+
comments: { visible: true },
101102
onReady: () => {
102103
debug('SuperDoc is ready');
103104
isInitialLoad = false;

apps/vscode-ext/webview/style.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ body {
2828
right: 0;
2929
bottom: 0;
3030
overflow: auto;
31-
display: flex;
32-
justify-content: center;
3331
}
3432

3533
/* Override SuperDoc theme */

0 commit comments

Comments
 (0)