Conversation
Signed-off-by: Xiyu Oh <xiyu@openrobotics.org>
Signed-off-by: Xiyu Oh <xiyu@openrobotics.org>
|
I'm guessing there is no way to do a "Download" instead? |
Signed-off-by: Xiyu Oh <xiyu@openrobotics.org>
|
@luca-della-vedova Added in 708d35c |
|
Hi XY, this feature is great! Not directly related to this PR, but now you can update the following line in the root |
|
@mxgrey I was thinking of both download and copy/paste features to be accessible within the |
I don't have a strong opinion either. But I think offering the ability to copy text could be convenient during development. |
Signed-off-by: Xiyu Oh <xiyu@openrobotics.org>
|
Added
|

This PR targets #423 and provides a way for users to export their site JSON on web via copy/paste. The objective is to allow users to store changes they made on the web editor.
Currently we do not support saving to file on wasm due to limitations in accessing the file system, so as a workaround this PR generates the site file to JSON string and allows the user to copy it. There could be better alternatives out there and I'm open to suggestions!
One thing to note -
write_text()is currently only enabled for secure context (e.g.https://,localhost), more details here.CC @JohnTGZ
To test
Follow instructions on the main README to run the editor on web. Under
Filein the top menu bar, you'll see anExport JSONbutton. Upon clicking on it a dialog will appear with the JSON string and button to copy all to clipboard.