Builder Playground
Configure, run, and inspect the editor live

Automation API

This playground can be scripted from JavaScript. The live Unlayer editor is window.unlayer. A promise-based helper is available at window.playground; calling playground.help() returns its usage guide.

  • await playground.init(options) re-initializes the editor with raw unlayer.init options merged over the sidebar config.
  • await playground.call('exportHtml') calls any callback-style SDK method and resolves with its result.
  • await playground.run(code) evaluates JavaScript with unlayer and playground in scope.
  • await playground.ready(), playground.waitForEvent(name), playground.getInitOptions(), and playground.reset() are also available.

Without script access, the same is possible through the "Console" tab in the bottom panel and the "SDK Overrides (JS)" section at the bottom of the sidebar.