Skip to content

Move 'dot-uve.js' Script and logic Injection to Backend #34905

@KevinDavilaDotCMS

Description

@KevinDavilaDotCMS

Description

The PageAPI currently returns content for traditional pages, generated based on user's VTL code. This content is available in the entity.page.rendered attribute. Subsequently, this code is injected into UVE via an iframe.

There is a JavaScript file (dot-uve.js) that handles all communication between the iframe and the editor. Currently, this script is manually injected into the HTML by the frontend. The frontend is responsible for manipulating the rendered string and inserting the reference to this script.

The goal of this task is to move the injection of the script reference to the backend. This will lighten the load on the frontend and reduce client-side code manipulation.

Acceptance Criteria

The dot-uve.js script reference is injected into the HTML content by the backend before it is sent to the frontend.,The frontend no longer performs any manual manipulation of the rendered string to inject the dot-uve.js script.,The communication between the iframe and the UVE editor, handled by dot-uve.js, continues to function correctly without regressions.,The frontend's responsibility for handling the rendered string is reduced, demonstrating a lighter load or simpler client-side code.

Priority

Medium

Additional Context

The PageAPI delivers the page content in entity.page.rendered. This content is then loaded into an iframe within UVE. The dot-uve.js script is crucial for enabling interaction between the content inside the iframe and the UVE editor itself. The current frontend implementation involves string manipulation to insert the <script> tag, which this task aims to eliminate.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions