Make drupalSettings available in code editor preview

Created on 16 June 2025, 7 days ago

Overview

Code components may want to access window.drupalSettings. Which they can when they're rendered on a page or in the XB page preview. But not in the code editor preview currently, which is an empty iframe.

Proposed resolution

Pass drupalSettings to the code editor preview iframe in src/features/code-editor/Preview.tsx the same way we pass the compiled JavaScript to preview along with prop values and compiled JavaScript for slots.

✨ Feature request
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡³πŸ‡±Netherlands balintbrews Amsterdam, NL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024