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.
Issue fork experience_builder-3530429
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
balintbrewsComment #4
wim leersComment #7
hooroomoo