Skip to main content
Inspiring
August 20, 2025
Question

Responsive text input

  • August 20, 2025
  • 1 reply
  • 134 views

Hello, Is it possible, using the following code, to restore all the publishing features ("center the scene", "adjust the visible area") to make the text input area fully responsive?

// create and add input tf
const inputElement = document.createElement("input");
inputElement.type = "text";
inputElement.placeholder = "Enter text here";
document.body.appendChild(inputElement);
 
// detect when text changes
inputElement.addEventListener("input", changeF);
function changeF(e){
alert(e.target.value);  // <-do whatever with the input
}

1 reply

kglad
Community Expert
Community Expert
August 20, 2025

whatever settings you want added to inputElement, you'll need to apply after its creation.

Inspiring
August 20, 2025

So? Is it possible?

kglad
Community Expert
Community Expert
August 20, 2025

yes.