openui icon indicating copy to clipboard operation
openui copied to clipboard

Exporting complete HTML and CSS

Open cashgarman opened this issue 1 year ago • 2 comments

Excellent project first of all!

Unless I am missing something, copying or saving the resulting HTML into something usable, it only seems to copy small portion of the HTML, with a lot of the CSS styling missing.

cashgarman avatar May 16 '24 21:05 cashgarman

Page in OpenUI: image

Page in browser after copying the HTML into a .html file: image

cashgarman avatar May 16 '24 21:05 cashgarman

I just ran into this as well. Is there a reference to the rest of the files needed to complete this?

VideoFX avatar May 20 '24 01:05 VideoFX

@VideoFX @cashgarman I just pushed a change to main and deployed to the demo app. Copying or downloading now includes the needed wrapper to render properly. For future reference the needed template is:

<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.tailwindcss.com"></script>
  </head>
  <body>
    ${code}
  </body>
</html>

vanpelt avatar May 20 '24 23:05 vanpelt