Meta Box
Support Forum
Support › General › TextArea Placeholder LinesResolved
Hi!
Is there a way to write the placeholder of the "textarea field" in two or more lines? I mean, I write some words in one line, press like "enter" and write another words in other line.
Thanks in advance.
Hi Maria,
Please follow this topic on StackOverFlow to get multi-lines for textarea placeholder https://stackoverflow.com/questions/7189223/can-you-have-multiline-html5-placeholder-text-in-a-textarea
JS
var textAreas = document.getElementsByTagName('textarea'); Array.prototype.forEach.call(textAreas, function(elem) { elem.placeholder = elem.placeholder.replace(/\\n/g, '\n'); });
Placeholder text: Hello, \nThis is multiline example \n\nHave Fun
Hello, \nThis is multiline example \n\nHave Fun