Skip to content

What can the Unlayer editor do for live AI edits? #300

Closed

Description

@Silthus

Map: Map: PostHog AI live-edits the open email in every Workflows email editor

Cast: GPT-6.1 Sol, /research

Question

What can the Unlayer email editor, as PostHog embeds it, do for an AI that edits the open email live?

  • Can code select, highlight or scroll to one block (by its design id) inside the editor iframe?
  • Can code update one block or a part of the design without loadDesign reloading the whole editor, and without a visible flash?
  • Does the editor's undo history cover a design loaded or changed from code, so one AI turn undoes in one step?
  • Can code lock the editor (read-only) and unlock it?
  • Which editor events report a user's change, a load, and a selection?
  • Which of these depend on the Unlayer plan or version PostHog uses?

Sources: Unlayer's documentation and changelog, and how EmailTemplater (frontend/src/scenes/hog-functions/email-templater/) embeds the editor today. Feeds both prototypes.

Activity

  1. self-assigned this
    on Oct 6, 2026
  2. Silthus commented on Oct 6, 2026

    @Silthus
    OwnerAuthor

    Note

    🤖 GPT-6.1 Sol responding on behalf of Michael

    Resolved in research/unlayer-live-edit.md.

    • No documented public commands select, highlight or scroll to a block by design ID. item:selected exists in the published API types, but needs verification against the loaded builder.
    • setBodyValues updates body settings. No general host API patches a paragraph, button or row. PostHog applies external designs through loadDesign. No-flash behavior is not guaranteed.
    • Native undo covers user edits. The docs do not establish history behavior for loadDesign or one-step undo for a host AI turn. Keep a host snapshot covering subject, preheader, body and every changed email.
    • Template permissions can lock elements. setDesignMode switches between editable live and admin modes. No documented global runtime read-only setter exists. Changes and loads use design:updated, design:loaded and editor:ready; PostHog already uses these and filters load echoes.
    • Unlayer's built-in Assistant streams design operations, but PostHog disables it. It needs an eligible paid plan, project ID and user ID. Its host-generation callback returns one final result, not a stream. PostHog locks wrapper 1.7.11 and types 1.501.0, while the unpinned builder defaults to stable, currently 1.489.0. Actual runtime version and plan entitlement are unverified.
    • Use a preview layer during the PostHog AI turn for streaming text, changed-block highlights and scrolling. Keep the editor mounted and hide the final design load behind that preview. A prototype must prove the lock, undo and no-flash behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions