Embedded Editor alpha for the new PandaDoc editor

The new PandaDoc editor is now available in Embedded Editing as an alpha of pandadoc-editor. If your workspace already uses the new editor in the PandaDoc web app, you can embed that same editor in your product — with one-to-one feature coverage relative to the web app (fields, content blocks, variables, recipients, and the rest of the new editing experience).

Prerequisite (required). The new editor must already be enabled for your workspace in the PandaDoc web app. If you still see the classic editor at app.pandadoc.com, do not switch the embed yet. Workspace admins can check early access under Settings → Set up workspace → Early access → Template and document creation. Details: New PandaDoc editor.

This is a 2.0 alpha. Production latest remains 1.0.1 and continues to load the classic embedded editor. Opt in only if you have the new editor in the web app and can test the breaking API changes below.

Install

npm install [email protected]

Or npm install pandadoc-editor@alpha. Package: [email protected].

Open a document or template

The E-Token still comes from Create Document Editing Session or the matching template endpoint. open() is now the only method; the token identifies what you are editing.

import { Editor } from "pandadoc-editor";

const editor = new Editor("editor-container", { height: 900 }, { region: "com" });

await editor.open({
  token: "your-e-token-here",
  // optional: hide individual field or block types
  fields: { stamp: { visible: false } },
  blocks: { quoteBuilder: { visible: false } },
});

Breaking changes from 1.x

  • openDocument() and openTemplate() are removed. Use open({ token }).
  • Pass token (and session options) to open(), not the constructor. The constructor only describes how the editor is mounted: width, height, backgroundColor, debugMode.
  • fieldPlacementOnly: true becomes features: { blocks: false }.
  • hiddenElements becomes features.recipients, features.roles, and features.variables.
  • fields and blocks still use { visible } maps. Some keys now match product names, for example cardDetails (was payment_details), collectFiles (was collect_file), radioButtons (was radio_buttons), pageBreak (was page-break), smartContent (was placeholder), quoteBuilder (was quote).
  • The editor iframe loads from https://app.pandadoc.com/editor-e-token/ (EU: https://app.pandadoc.eu/editor-e-token/). Update any origin or path allowlists that still reference /document-editor/.

Full option reference: the package README. Existing Embedded Editing docs on this site describe 1.x until the 2.0 release.

Feedback and bugs. This alpha is supported as a preview. Report issues to [email protected].