xxxxxxxxxx
19
function setup() {
createCanvas(500, 150);
// Create input element
let inputElem = createInput('');
inputElem.input(onInput);
}
function onInput() {
clear();
fill("#fff")
noStroke()
rect(0, 0, 500, 150)
// Display the text entered
fill("black")
textSize(28);
text(this.value(), 10, 10, 490, 490)
}