eigenpal/pptx-editor
 Watch    0
 Star    14
 Fork    1

PPTX Editor by EigenPal

npm version npm downloads license Demo

PPTX Editor is a WYSIWYG editor and headless rendering engine for .pptx presentations. Use it to edit, render, automate, and export slides on the client or the server. It uses the ECMA-376 (Office Open XML) format. Licensed packages add real-time collaboration, comments, and PDF export. It is part of the EigenPal editor family, with DOCX Editor.

Live demo | Documentation | Editor API | PPTX fidelity | DOCX Editor | PPTX Editor

Quick start

Install the adapter for your framework and its peers:

npm install @pptx-editor.dev/react @pptx-editor.dev/core   # React
npm install @pptx-editor.dev/vue @pptx-editor.dev/core     # Vue

See the React or Vue quick start.

PPTX Editor with the sample presentation open

Features

Feature Description
Editor API Automate presentations in a browser or on a server with a supported subset of the Office.js presentation API.
Slide editing Edit text, shapes, pictures, tables, and slides, with undo and redo.
Faithful rendering Render themes, layouts, geometry, fills, and text layout by the ECMA-376 standard.
Save and reopen Keep untouched content, unknown markup, and media when you save.
Custom UI Replace or hide toolbar, ribbon, menu, and dialog controls, or build your own.
Light and dark themes Match the editor chrome to your app with one set of tokens.
React and Vue Use either adapter with the same engine and styles.
Fonts Use embedded fonts, metric-compatible substitutes, or your own fonts.
Review and collaboration Comment on slides and edit together in real time.
PDF export Convert presentations to PDF on Node.js.

Packages

Package Description Docs
@pptx-editor.dev/react React editor components and hooks. React adapter
@pptx-editor.dev/vue Vue 3 editor components and composables. Vue adapter
@pptx-editor.dev/core The engine: parse, layout, paint, edit, and save. Core engine
@pptx-editor.dev/i18n Interface strings. Language
@pptx-editor.dev/pro Comments, drawing, and real-time collaboration modules, and the comments pane for React and Vue. Pro modules
@pptx-editor.dev/editor-api A supported subset of the Office.js presentation API for browser and server editing. Presentation automation
@pptx-editor.dev/pptx-to-pdf Convert PPTX to PDF on Node.js. PDF export

@pptx-editor.dev/editor-api, @pptx-editor.dev/pro, and @pptx-editor.dev/pptx-to-pdf use the EigenPal Pro License. See the license terms for editor-api, pro, and pptx-to-pdf.

React

Pass the presentation bytes to the editor and give its container a height:

import { PptxEditor } from '@pptx-editor.dev/react';
import '@pptx-editor.dev/react/styles.css';

export function App({ deck }: { deck: Uint8Array }) {
  return (
    <div style={{ height: '100vh' }}>
      <PptxEditor document={deck} />
    </div>
  );
}

For Next.js, load the editor with dynamic(..., { ssr: false }). See examples/nextjs.

Vue

Pass the same presentation bytes through the Vue adapter:

<script setup lang="ts">
import { PptxEditor } from '@pptx-editor.dev/vue';
import '@pptx-editor.dev/core/styles/editor.css';

defineProps<{ deck: Uint8Array }>();
</script>

<template>
  <div style="height: 100vh">
    <PptxEditor :document="deck" />
  </div>
</template>

Documentation

  • Introduction and quickstart: install the editor, open a deck, and save it.
  • Installation: packages, peer dependencies, styles, and bundlers.
  • Customization: appearance, layout, toolbar, ribbon, menus, dialogs, and fonts.
  • Tables: insert and edit tables with editor commands.
  • Editor API: edit slides, shapes, text, and tables from code on a server or in an open editor.
  • PPTX fidelity: what you can edit, display, and save, and the known approximations.

For complete workflows, see loading and saving, collaboration, and PDF export. The react and vue READMEs list every part.

Development

Install the toolchain in Contributing, then run:

bun install
bun run dev          # React demo: localhost:5274
bun run dev:vue      # Vue demo: localhost:5275
bun run dev:nextjs   # Next.js demo: localhost:3000

Examples: Vite | Vue | Next.js

Contributing

See Contributing for setup, tests, and the Contributor License Agreement (CLA).

License

The repository uses Apache 2.0, except for the files that the license scope notice in LICENSE excludes. @pptx-editor.dev/editor-api, @pptx-editor.dev/pro, and @pptx-editor.dev/pptx-to-pdf use the EigenPal Pro License: production use requires a commercial agreement. Contact licensing@eigenpal.com. Third-party material keeps its own terms.

Security and feedback

Report vulnerabilities through the security policy. For other bugs, open a GitHub issue with the steps to reproduce and a synthetic or sanitized deck. Never attach confidential decks.


DOCX Editor      PPTX Editor

关于
Open-source .pptx editor library for React and Vue with canonical OOXML and real-time collaboration. Agent-ready.
最后更新于  1 days ago
License