Repository navigation
Community renderers for editable PowerPoint and Word files #488
jantursky
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I built community renderers that turn json-render specs into editable
.pptxand.docxfiles, in case this is useful to others.json-render-pptx: a slide catalog (Deck, Slide, Columns, Title, Text, BulletList, Table, Chart, Image) rendered with native, editable charts and tables.json-render-docx: a Word catalog (Document, Section, Heading, Paragraph, List, Table, Image, TableOfContents, headers and footers).json-render-report: one report catalog rendered to a web preview, a deck and a document.json-render-office: the shared spec walker, image loading, theme and schema helper.How it works: a model writes a flat
root+elementsspec that follows a catalog (catalog.prompt()teaches it the components). The walker resolvesvisible,repeatand prop expressions with@json-render/coreand maps each type to a Vue component built on vue-pptx-document and vue-docx-document. A half-streamed spec renders: missing roots, children and unknown types are skipped with a warning. Slides take no coordinates; layouts and flexbox place the content. Images are limited tohttps:anddata:sources.What is checked: output opened in LibreOffice 26.8.3.1, plus the Open XML SDK validator and a LibreOffice oracle in CI. What is not: I have not opened the files in PowerPoint, Word, Keynote, Pages or Google. The README lists this per feature.
Not covered yet: PDF (the report spec could map to
@json-render/react-pdf), charts in Word, XLSX, transitions, masters and templates.Community project, not affiliated with or endorsed by Vercel. "json-render" is the name of the Vercel Labs project these packages render for. Feedback on the catalog design and on anything that breaks in a real Office app is welcome.
All reactions