Once the user has finished customising, I need to display the resulting image on another page, but this is (so far) impossible.
The two obvious solutions would be to copy the image to another page or take a snapshot.
Copy
If I copy the image to another page then neither windows displays because the CSS/HTML attributes (height, width opener direction etc) must be unique for each window. I have tried renaming all the attributes so that the second window has unique names, it almost works, the sizing is OK but many features are broken. It is worth mentioning that the window is extremely complex. There are about 50 custom states and many hold dozens of variables, the window is a complex beast.
Snapshot
There is currently no screen capture software which can handle an image made from CSS/HTML. The result looks awful.
Has anyone got any suggestions because I am stuck on this?
Surely you can just recreate the elements on another page (or just copy the page)ā¦
Obviously youāll have to pass the relevant attributes to the second page (which presumably are all store in the database, so just a reference to the Object is all you need), and youāll need to adjust your CSS values accordinglyā¦
But other than that I canāt see why there should be any issue.
Do you have any links to preview pages or editor pages to take a look at to make things clearer?
I would be extremely grateful if you could have a look, thank you. I am going to clone the site and prepare a link for you.
Ideally a snapshot would be preferable because I need to show a smaller version of the window on several pages - I suppose I could have conditions on the main window to handle this, but ultimately the customer will want to print their window so at some point I need a clear snapshot.
Anyway, to recreate the elements on another page would be a huge step forward and allow me to effectively launch the app as this is about the final issue to solve.
UPDATE: I canāt clone the site because āThis application is at its limit for number of Things in the database. Please upgrade your application to continue saving dataā
hmmm, is there a way I can give you (only you) access to my app?
You can DM me a link to your editor and Iāll take a look (make sure your app is set to anyone can view)⦠or you can add me as a āview onlyā collaborator.
@adamhholmes I am able to get on to openai chatbot again after two weeks of it being down for me. So, it has said I can achieve a screenshot of an HTML element using a JavaScript library and convert it to a data URL. Iām currently working on this ⦠who knows, maybe the bot will succeed!
Ok, hereās where I am with this, any help much appreciated.
I am trying to create a feature on my website that allows users to take a screenshot of a specific area of the page and then save that image to my database. To achieve this, I have implemented the following steps:
I created an HTML element that allows users to take a screenshot using the āsnapā id.
I added a āsaveā button to the page with the id āsave-buttonā.
I added some JavaScript code to trigger a workflow when the āsaveā button is clicked. This workflow has three steps:
a. The first step runs the JavaScript code that captures the screenshot and converts it to a Data URL (code below).
b. The second step creates a new āWindowFileImageā Thing in Bubble with the āfileā field = dataUrl
c. The third step makes changes to the āWindowFileImageā Thing and sets the āfileā field to file = dataUrl
I tested the feature and found that the image is not being saved to the database, I think the issue is the naming of the file = ādataUrlā (see image below). I guess I am not able to rename the image file when it is saved to the database, I donāt know how to do this?
I actual donāt know! I have zero experience with java and have been asking the chat AI for help. Iām completely lost/stuck. I have been trying to get a screen shot for about 2 months on and off so I am willing to even ask a robot now
@dorilama Yes thatās correct. I couldnāt get the javascript to work and so I tried to ask chatAI to help implement it. Then it provided similar (slightly different) Javascript so I tried that but I got stuck.
All that said, I just purchased yet another plugin called Screenshot Generator, which was built using the html2canvas library, the same library I believe in the link above. Sadly the image it produces does not capture HTML shadows/bevel so it seems the html2canvas library is the same as every other plugin.
I now have no idea what to do, I canāt believe that I am unable to launch my app because I can not display an image on a different page! The image must be good, the entire app is literally for designing windows and so this is a crucial step.