P5js-Dom-Textarea

From Digipool-Wiki
Revision as of 15:00, 21 June 2021 by WikiSysop (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Befehl


myInput = createElement('textarea', 'your text here');

myString = myInput.value();


Example

var myString;
var myInput;

function setup() {
  myInput = createElement('textarea', 'your text here');
  myInput.position(100, 100);
  myInput.size(200,200);
  myInput.style("resize", "none");
}

function draw() {
  background(220);
  
  myString = myInput.value();
  text(myString, 20, 20);
}


Siehe auch w3schools HTML DOM Style Object