JSFiddle - React, Tailwind, and code Playground

by Walter Rumsby

HTML

<!DOCTYPE html>
<html>
    <head>
        <title>Placeholder</title>
    </head>
    <body>
        <div id="foo"></div>
    </body>
</html

JavaScript

YUI().use('node', 'substitute', function(Y) {
    var node = Y.Node.create('<input id="bah" type="text" placeholder="Some text">');
    Y.Node.one('#foo').append(node);
    
    var info = Y.Node.create(Y.substitute('<p>Placeholder: {placeholder}</p>', { placeholder:Y.one('#bah').get('placeholder') }));
    Y.Node.one('#foo').append(info);                                                                                 
});