Skip to content
Open source

.pptx editor
for React and Vue

Embed an open-source presentation editor in your app. Edit slides, shapes, tables, and speaker notes. Open and save .pptx files in the browser.

PPTX editor for React and Vue 3: an open-source presentation editor component in JavaScript. Edit .pptx files in the browser.

Live demo

Try the editor

Test @pptx-editor.dev/react in your browser. Edit the sample or open your own .pptx file, then save your changes. Files are processed locally.

Open full editor
Features

Presentation editing features

Open, edit, and save .pptx presentations in the browser. Parsing, layout, painting, and saving all run client-side.

PDF export

Pro

Convert a deck to PDF on Node.js with the editor's own layout and searchable text. Diagnostics name what the PDF approximates.

Explore PDF export

Slide images

Export one slide as PNG or SVG, or every slide as PNG files in a ZIP. It runs in the browser, from the open editor.

Export slide images

Charts

Pro

The drawing module draws bar, column, line, area, scatter, pie, doughnut, and radar charts from the values the deck caches.

Read about drawing

Cards marked Pro need a package under the EigenPal Pro License. For feature-by-feature support, see PPTX fidelity.

Also from EigenPal

Decks and documents.

DOCX Editor is our open-source document editor for React and Vue. It opens and saves .docx files in the browser, with tracked changes and threaded comments. Both editors are built the same way:

  • Adapters

    React and Vue components, installed the same way.

  • Editing API

    An Office.js-style API that works on a server or in the browser.

  • Round trip

    Save your edits without losing anything else in the file.

  • Pro

    Real-time collaboration and PDF export, in both editors.

PPTX Editor
DOCX Editor

$ npm install @pptx-editor.dev/react @pptx-editor.dev/core

$ npm install @docx-editor.dev/react @docx-editor.dev/core

Editing API: server and browser

Edit .pptx files with code

An Office.js compatible API for slides, shapes, text, and tables. Queue changes in code, then call context.sync() to apply them in Node.js or the browser.

add-title.tsTS
import { readFile, writeFile } from 'node:fs/promises';
import { PptxEditor } from '@pptx-editor.dev/editor-api';

const bytes = await readFile('deck.pptx');
const runtime = await PptxEditor.createServer(bytes);
try {
  await runtime.run(async (context) => {
    const slide = context.presentation.slides.getItemAt(0);
    const title = slide.shapes.addTextBox('Quarterly results', {
      left: 40,
      top: 40,
      width: 400,
    });
    title.textFrame.textRange.font.bold = true;
    await context.sync(); // the queued calls run here
  });
  await writeFile('edited.pptx', await runtime.save());
} finally {
  runtime.dispose();
}

// In a page, call createBrowser(editor) from
// '@pptx-editor.dev/editor-api/browser' instead.
Presentation building blocks

Add agent tools and custom controls

Wrap Editing API calls in agent tools. This example adds text to the current slide. Each sync that writes creates one undo step.

pilot-review.pptxPPTX

Next steps

  • Confirm owners for each workstream
  • Review the timeline on Friday

Takeaway: expand the pilot to every region.

AAgent added a text box. One undo step.Ctrl+Z
takeaway-tool.tsTS
import { tool } from 'ai';
import { z } from 'zod';
import { usePptxEditor } from '@pptx-editor.dev/react';
import { PptxEditor } from '@pptx-editor.dev/editor-api/browser';

// Combine presentation operations into an app-specific tool.
export function useTakeawayTool() {
  const editor = usePptxEditor();

  return tool({
    description: 'Add a takeaway to the slide the user is on.',
    inputSchema: z.object({ text: z.string() }),
    execute: async ({ text }) => {
      const runtime = PptxEditor.createBrowser(editor!);
      try {
        await runtime.run(async (context) => {
          const index = editor!.snapshot().currentSlide;
          const slide = context.presentation.slides.getItemAt(index);
          slide.shapes.addTextBox(text, { left: 40, top: 400, width: 640 });
          await context.sync(); // a sync that writes is one undo step
        });
      } finally {
        runtime.dispose();
      }
    },
  });
}

Pricing

The editor is Apache 2.0, free in commercial products. Pro adds collaboration, the Editing API, PDF export, and advanced drawing. Evaluation is free. Production use requires a commercial agreement.

CommunityApache 2.0

Open source

$0forever
  • Open, edit, and save .pptx files in the browser
  • Text, shapes, pictures, tables, notes, and slides
  • The packaged React or Vue editor, or your own UI
  • Slide images as PNG and SVG
  • Use it in commercial products
  • @pptx-editor.dev/core
  • @pptx-editor.dev/react
  • @pptx-editor.dev/vue
  • @pptx-editor.dev/i18n
Read the docs

Install from npm. No account and no key.

CommercialEigenPal Pro License

Pro

Talk to us

Free to evaluate. Production use needs a commercial agreement.

  • Real-time collaboration through a Yjs session
  • The Editing API, on a server or in the open editor
  • PDF export on Node.js, with diagnostics
  • Charts, glow, soft edges, and reflections
  • Legacy comments read from the deck
  • @pptx-editor.dev/pro
  • @pptx-editor.dev/editor-api
  • @pptx-editor.dev/pptx-to-pdf

Pro modules run in evaluation mode without a key. License checks make no network requests. Read the EigenPal Pro License or the Pro modules guide.

Quickstart

Get started

Pass presentation bytes to the editor. Call save() to get the edited file. Your app handles storage.

Editor.tsxTSX
import { useRef } from 'react';
import { PptxEditor, type PptxEditorRef } from '@pptx-editor.dev/react';
import '@pptx-editor.dev/core/styles/editor.css';

export function Editor({ deck }: { deck: Uint8Array }) {
  const editorRef = useRef<PptxEditorRef>(null);

  async function save() {
    const bytes = editorRef.current?.save();
    if (!bytes) return;
    await fetch('/api/decks/1', { method: 'PUT', body: bytes });
  }

  return (
    <main style={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>
      <button onClick={save}>Save</button>
      <div style={{ flex: 1, minHeight: 0 }}>
        <PptxEditor ref={editorRef} document={deck} mode="edit" />
      </div>
    </main>
  );
}
Questions

FAQ

Add .pptx editing to your app

Start with the React or Vue quickstart, or test your files in the demo.