Embed Viewer

Display an embed within an <iframe>.

  • If no embed id was included when creating the token, the <iframe> first displays a document picker where the user can create and configure a new embed.
  • If embed id was included, then, depending on the embed session token request body and embed settings, the <iframe> displays either an embedded document viewer, an embedded editor where users can collaborate, or an embed configuration page for the associated document.
<iframe
  src='<https://lucid.app/embeds?token=:token>'
></iframe>

Document Embedding Event

Below is a list of possible events via postMessage sent to the parent window:

The EmbedCreated event

Fired when a new embed is created by the user.

PropertyTypeDescription
typeString"LucidEmbedEvent"
eventString"EmbedCreated"
documentIdUUIDID of the selected document.
embedIdStringID of the newly created document embed.
signatureStringSignature of the newly created document embed.

The SettingsClosed event

Fired when the embed settings are updated by the user.

PropertyTypeDescription
typeString"LucidEmbedEvent"
eventString"SettingsClosed"
settingsUpdatedBooleantrue if the user changed the embed settings.

The OpenCustomSettings event

Fired when the "Settings for " button is clicked by the user.

PropertyTypeDescription
typeString"LucidEmbedEvent"
eventString"OpenCustomSettings"
Language
Authorization
OAuth2
Click Try It! to start a request and see the response here!