Does write() not work in the web editor?

In my project I’m basically trying to make a string of text and save it to my computer in a .txt file.

https://p5js.org/reference/#/p5.PrintWriter/write
So in the reference for write(), you call the function and it automatically downloads the file. When I run the same exact code in the web editor, nothing happens.

Is it possible to call this function in the web editor? If so, how do I do it?

Hello, and welcome to the forum!

I’m guessing you’re using Chrome, right? You’ve stumbled upon this bug. Until it is fixed, run your code in the presentation mode (File > Share) as a workaround. Or use another browser like Firefox.

2 Likes