Skip to main content
Inspiring
Aug 20, 2025 12:55 PM UTC
Question

Responsive text input

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
}

3 replies

kglad
Community Expert
Community Expert
Aug 20, 2025 1:20 PM UTC

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

Translate
Inspiring
Aug 20, 2025 4:05 PM UTC

So? Is it possible?

Translate
kglad
Community Expert
Community Expert
Aug 20, 2025 8:22 PM UTC

yes.

Translate