- Issue created by @loze
- Merge request !144Issue #3449711 - Render content blocks in the editor with AjaxResponse so libraries are included β (Merged) created by loze
- Status changed to Needs review
6 months ago 5:49am 25 May 2024 - πΊπΈUnited States loze Los Angeles
I dug around a little in this and realized that the libraries wernt being included because renderContentBlock() was returning a plain json response with the rendered html only and no libraries.
I switched this to return an ajaxResponse and populate the block in the editor with drupals ajax commands since that has the benifit of including any attached libraries in the render array
It probably needs some cleaning up, but it seems to be working from my initial testing
- πΊπΈUnited States loze Los Angeles
This should also render the block using the front end theme templates. Right now it doesn't that yet.
- First commit to issue fork.
-
marcofernandes β
committed 089b647b on 3.x authored by
loze β
Issue #3449711 - Render content blocks in the editor with AjaxResponse...
-
marcofernandes β
committed 089b647b on 3.x authored by
loze β
- Status changed to Fixed
6 months ago 11:57am 27 May 2024 - π΅πΉPortugal marcofernandes
Nicely done! Now implemented in the proper way π
-
marcofernandes β
committed 089b647b on 3.0.x authored by
loze β
Issue #3449711 - Render content blocks in the editor with AjaxResponse...
-
marcofernandes β
committed 089b647b on 3.0.x authored by
loze β
- π¨π¦Canada drclaw
This is awesome! π
But a small side effect / regression is that blocks are now rendered using the admin theme which means any template overrides / preprocessors in the default theme won't be used when rendering the block. Will post a new issue shortly with an MR π
Automatically closed - issue fixed for 2 weeks with no activity.