Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Page V2: Render HTML from Page API to New Editor #27596

Closed
2 tasks
Tracked by #27546
fmontes opened this issue Feb 12, 2024 · 1 comment
Closed
2 tasks
Tracked by #27546

Edit Page V2: Render HTML from Page API to New Editor #27596

fmontes opened this issue Feb 12, 2024 · 1 comment

Comments

@fmontes
Copy link
Member

fmontes commented Feb 12, 2024

Parent

#27546

Task description

As a dotCMS user, I want to be able to use the new page editor with VTL rendered pages.

This should only apply to pages that are not headless. When the feature flag is set, the new editor should display a VTL rendered page in the editor iframe.

Acceptance Criteria

Preview Give feedback

External Links

We can try to use Blob to render the HTML

// Step 1: Create the content
var htmlContent = '<!DOCTYPE html><html><body><h1>Hello, World!</h1></body></html>';

// Step 2: Create a Blob from the content
var blob = new Blob([htmlContent], { type: 'text/html' });

// Step 3: Create a Blob URL
var blobUrl = URL.createObjectURL(blob);

// Step 4: Set the Blob URL as the iframe source
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
iframe.src = blobUrl;

We don't know the implications of this in terms of permissions and cross-origin issues.

Assumptions & Initiation Needs

  • The feature flag for rendering HTML from the page API in the new editor should be implemented and activated.
  • The VTL template associated with each page should be correctly defined and accessible.
  • The new editor should be integrated with the page API to retrieve the HTML content for rendering.
@fmontes fmontes changed the title Render HTML from Page API to New Editor Edit Page V2: Render HTML from Page API to New Editor Feb 12, 2024
@fmontes
Copy link
Member Author

fmontes commented Feb 12, 2024

Close in favor #27547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant