Goal:
- Have a REST endpoint which will deliver list of rendered entities.
- Each row should contain a ready-to-use HTML.
- All the necessary JavaScript and CSS files should be also included on the page.
- P.S. I need this endpoint for lazy-loading of entities.
Given:
- I have a Views display with REST export.
- I render entities there using the rendered_entity field.
Problem:
- JavaScript and CSS files, needed for rendering, are not attached on the page.
- E.g. scripts for display of an image gallery, lazy-loading of images.