feat: add Phase 6C — export to editable PPTX via dom-to-pptx#71
Open
Enderfga wants to merge 1 commit into
Open
feat: add Phase 6C — export to editable PPTX via dom-to-pptx#71Enderfga wants to merge 1 commit into
Enderfga wants to merge 1 commit into
Conversation
Mirrors the existing PDF export workflow but produces a native, editable .pptx file instead of a screenshot PDF. Every text run becomes a real PowerPoint text frame; CSS gradients become vector SVGs; box-shadows become PowerPoint shadows; <img> elements embed as picture shapes. Useful when a conference / venue laptop only accepts PowerPoint, or when collaborators want to edit slide text directly without going back to HTML. Implementation: - New scripts/export-pptx.sh, self-contained: installs Playwright + dom-to-pptx into a temp dir on first run, serves the deck over local HTTP (fonts + relative assets work), injects dom-to-pptx into the page, force-reveals .reveal/.visible elements, then calls exportToPptx() on every .slide and writes the resulting Blob to disk. - Symlinked into plugins/frontend-slides/skills/frontend-slides/scripts/ to match the existing plugin layout. - SKILL.md: new Phase 6C section documenting usage, behind-the-scenes, and gotchas (layout fidelity, fonts/CORS, animation handling, file size). - README.md: "Export to editable PPTX" subsection, supporting-files table row, requirements bullet. Addresses zarazhangrui#28 (HTML → PDF / PPTX request) and unblocks workflows that need editable downstream slides.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an editable PPTX export alongside the existing PDF export. Every text run becomes a native PowerPoint text frame; CSS gradients become vector SVGs; box-shadows map to real PowerPoint shadows;
<img>elements embed as picture shapes. The deck remains directly editable in PowerPoint, Keynote, Google Slides, and WPS.This addresses #28 — both the original PDF request (already merged) and @Hannsek's follow-up "Also maybe to pptx/google slides with all the animations". PPTX is the right answer for a class of cases PDF doesn't cover: venue laptops that only accept
.pptx, collaborators who want to edit text right before presenting, repurposing individual slides in other decks.What's added
scripts/export-pptx.sh— self-contained CLI that mirrorsexport-pdf.sh's UX (auto-installs Playwright + dom-to-pptx into a temp dir on first run, serves the deck over local HTTP, opens result on success).SKILL.md§ 6C — Phase 6C documents usage, what the export produces, and the gotchas (layout fidelity for deeply-nested flex, fonts / CORS, animation handling, file size).README.md— new "Export to editable PPTX" subsection, supporting-files row, and a requirements bullet.plugins/frontend-slides/skills/frontend-slides/scripts/export-pptx.shsymlinks to the real script, matching the layout already used fordeploy.sh,export-pdf.sh,extract-pptx.py.Usage
How it works
.reveal/.visibleelement so off-screen content is fully laid out before measurement.Array.from(document.querySelectorAll('.slide'))todomToPptx.exportToPptx(), gets aBlobback, base64-encodes it on the page, decodes it back in Node, writes the.pptx.dom-to-pptx is MIT-licensed and stable (~180 ⭐, active maintenance, v1.1.9 ships an official browser bundle).
Tested on
--compactflag-style escape hatch nowhere (kept the CLI surface minimal — happy to add flags if useful).Tradeoffs / known limits
100vhheight inheritance can produce slides where some shapes are missed. The new SKILL.md guidance recommends fixed 1920×1080 absolute positioning for max fidelity, which dovetails with whatviewport-base.cssalready targets.What I'm not doing
dom-to-pptxas a hard dependency in the repo — it installs into the temp dir at runtime, same pattern as Playwright.Happy to iterate on the wording, flag surface, gotcha list, or the SKILL.md placement.