---
agentTools:
  projectIndex: https://developers.pandadoc.com/llms.txt
---

# Embedded Editor alpha for the new PandaDoc editor

The [new PandaDoc editor](https://support.pandadoc.com/en/articles/12680681-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](https://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](https://support.pandadoc.com/en/articles/12680681-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**

```bash
npm install pandadoc-editor@2.0.0-alpha.0
```

Or `npm install pandadoc-editor@alpha`. Package: [pandadoc-editor@2.0.0-alpha.0](https://www.npmjs.com/package/pandadoc-editor/v/2.0.0-alpha.0).

**Open a document or template**

The E-Token still comes from [Create Document Editing Session](https://developers.pandadoc.com/reference/create-document-editing-session) or the matching template endpoint. `open()` is now the only method; the token identifies what you are editing.

```javascript
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](https://www.npmjs.com/package/pandadoc-editor/v/2.0.0-alpha.0). 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 <api-track@pandadoc.com>.