Skip to main content
All CollectionsEmbedding the Seats Designer
Embedded Designer and drawing versions (draft, published)
Embedded Designer and drawing versions (draft, published)

Handling drawing versions when embedding Designer inside your app, and why Designer might be opening your chart in read-only mode

Ben Verbeken avatar
Written by Ben Verbeken
Updated over a year ago

When you embed Designer inside your application, you can either not pass in any chart key (then you'll create a new chart), or pass in a chart key (to edit a chart).

By default, the chart designer opens the published version of that chart. Depending on whether or not a draft version already exists, this published version will either be editable (which will create a new draft version), or the chart will be opened in read-only mode.

You can change this behaviour by explicitely telling Designer which version to open. You have two options:

  • openDraftDrawing: explicitely open the draft drawing. Only use this when you know a draft drawing exists.

  • openLatestDrawing: open either the draft drawing if it exists, or the published drawing if no draft drawing exists. This is the safest option in most cases.

Why is Designer opening in Read-Only mode?

There's two ways that Designer can end up in a read-only state:

  1. You're explicitely setting designer to open in read-only mode, via the mode parameter.

  2. you're not passing any special config, but you're opening Designer with a chart key for which both a published and a draft drawing exist. Designer will then, by default, open the published version of a chart, in read-only mode. Like mentioned before, you can change this behaviour by either explicitly opening the draft version (openDraftDrawing: true), or by passing openLatestDrawing: true to let Designer decide which version to open: published if there is no draft version, draft is there is one.

Did this answer your question?