Preview pages without the WeWeb editor?

I have a link that I want to open in a new window.
I am using some javascript to set the size of the window and strip it of all the menus.

When I test the functionality in the preview tool, the window opens, but the WeWeb page it opens contains the WeWeb editor.

How can we actually see our projects as our customers would?

Hi,
if you wish to test this without the editor, you need to go to the preview (from the publishing, not inside the editor).
Also be aware that inside the editor, your app is load inside an iframe, and some of your code may not work for two reason

  • Your code may reference the wrong window. You are maybe changing the route of the main window, instead of the iframe one. Try to use wwLib.getFrontWindow() instead of window
  • The editor is controlling the size of the iframe for edition purpose. It is maybe overwritting what you are doing

Also, can you explain me with more details what you are doing and which part is not working? The navigation or the size part? Is it working on the published version?

1 Like

Thanks @aurelie - I do not see a preview in the Publish dropdown.

The end goal is to have a dynamic page open in a new window, that I am stripping of all the browser UI and setting the hight of.

Here is my code so far, in this code though, I have pasted in an end point URL, not ideal.

const windowFeatures = "left=100,top=100,width=520,height=620";
const handle = window.open(
  "https://editor.weweb.io/cff21e58-fec4-4287-a3e2-c9dbd72692d3/d96c80d5-92ec-4f88-870a-e2178fd94e7c",
  "mozillaWindow",
  windowFeatures,
);
if (!handle) {
  // The window wasn't allowed to open
  // This is likely caused by built-in popup blockers.
  // …
}

Currently, when my icon is clicked, the new window opens but I just see the Weweb editor. The original tab also reloads with the new page content, which is not desirable either.

Thanks

Publish and then you will get a url you can visit

Ah I see, so the full preview is behind the paywall. I had not realized that.
Hmm, I am a little hesitant to build out my concept if I cant be 100% sure of what it will look like to users later on.

Are you dependent on external libraries for the look of your app?

No, its just not having an exact view on what the page will look like to users is not ideal.

During early development, I only get to see what my pages look like in the editor… I could create multiple views, only to upgrade and have visual issues.

So just something to note, before investing that time.