Skip to content
Snippets Groups Projects
Commit b2bc5a7d authored by Jan Hug's avatar Jan Hug
Browse files

Update README

parent 2abddfab
No related branches found
No related tags found
No related merge requests found
......@@ -10,14 +10,15 @@ more complex form elements like tabs, accordion, entity autocomplete,
media library or entity browser, the amount of work required to get everything
to look (and work) good can be huge.
This module attempts to fix this problem by rendering any block edit forms
inside an iframe.
This module fixes this problem by rendering any layout builder forms inside an
iframe, with your admin theme.
## Features
- Completely isolated edit forms - no more CSS leaking
- forms are rendered in the site's admin theme
- Integrates seamlessly in the existing LB interface
- Resizes modal to match the height of the edit form
- Closes modal when the block is saved successfully
- Scrolls to the previous position in the layout after the modal is closed
- Works with translations (layout_builder_st)
- Provides a new "Rebuild" action in the layout form
......@@ -31,10 +32,18 @@ The custom ajax command handles setting up the dialog and attaches event
listeners to the iframe.
When submitting the block edit form and there were no errors, Drupal redirects
to the page provided in the destination parameter. This page contains a single
to the page provided in the destination parameter. This page includes a single
line of JavaScript which uses postMessage to notify the iframe's parent window.
The parent window listens for messages and will then close the modal and
trigger a rebuild of the Layout, so that it reflects the updated content.
## Requirements
None, it should work with any standard Layout Builder setup.
## Differences to layout_builder_modal
layout_builder_modal also shows the forms in a modal, but it renders them
directly in the page, using templates from your frontend theme and without any
CSS from the admin theme. This is the same behaviour as core Layout Builder.
This module just renders an iframe that contains the form rendered by Drupal in
the admin theme.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment