My P5 editor doesn't work

sketch.js

function setup() {
  createCanvas(400, 400);
}
function draw() {
  background(220);
}

Console

p5 had problems creating the global function “createElement”, possibly because your code is already using that name as a variable. You may want to rename your variable to something else.

same issue notated here June

the sketch.js code part is ok,
so you damaged the HTML part?

<!DOCTYPE html>
<html>
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
    <link rel="stylesheet" type="text/css" href="style.css">
    <meta charset="utf-8" />

  </head>
  <body>
    <script src="sketch.js"></script>
  </body>
</html>

what environment you are in?

using operating system ? and browser ?

src=“https://editor.p5js.org/Deseingalt/sketches/mJ2OcMqkI

<!DOCTYPE html>
<html>
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
    <link rel="stylesheet" type="text/css" href="style.css">
    <meta charset="utf-8" />

  </head>
  <body>
    <script src="sketch.js"></script>
  </body>
</html>

This new behavior occured since September 1,
other things, fill(‘red’) generate an error, and sounds occur where there was’nt
I use chrome with a asus chromebook…

i can not open the link to your sketch!
but your latest sketch “words 2” p5.js Web Editor
run here ( Win10 / Firefox ) well.

but try one of mine, with old 0.7.3

if that is the reason.

that can come from preferences icon / settings / Accessibility / lint warning: sound must be OFF

so anyhow that is a thing, try your sketch when you are log in / or out.

the answer was here

Yes, the plain-text and table-text boxes were checked (don’t know why).The plain-text box check causes the error.

thanks for help helping

1 Like

[CTRL][SHIFT][1] switch that ON ( [2] OFF )
give errors?? and also some sound, ( but that LINT sound can be much more confusing… happened to me ?? )
and that’s how i found out about that it only happens when login…