JSFiddle - React, Tailwind, and code Playground

HTML

<form method="post" name="form" action="">
        <input type="hidden" name="valida" id="valida" value="ok" />
        <table border="0" bgcolor="#E9EAED" style="margin:0px 0px 30px 0px;" width="100%" cellpadding="0" cellspacing="0">
            <!-- <?php if($_SESSION[ 'FBID'] || $_SESSION[ 'user_id']){ ?> -->
            <tr>
                <td valign="top">
                    <div id="flash" align="left"></div>
                    <div id="show" align="left"></div>
                </td>
            </tr>
            <tr>
                <td valign="top" width="7%">
                    <div style="padding:15px 5px 5px 20px;">
                        <img width="33" height="33" src="<?php echo $_SESSION['user_foto'] ?>" />
                    </div>
                </td>
                <td valign="top" width="93%">
                    <div style="padding:15px 20px 15px 5px;">
                        <input type="text" style="width:100%; height:33px;" placeholder="Escreve um comentário..." id="comentario" name="comentario" value="" />
                    </div>
                    <input type="button" id="submit" style="display:none;" class="submit_button" />
                </td>
            </tr>
        </table>
</form>

CSS

#flash {
    display: none;
}

JavaScript

$(function () {

    $('#comentario').on('keydown', function (e) {
        if (e.which != 13) return true;
        $('#submit').click();
    });
    $('form').on('submit', function (e) {
        e.preventDefault();
    });
    $(".submit_button").click(function () {
        var input = document.getElementById('comentario');
        var textcontent = input.value;
        var data = {
            id_estabelecimento: "<?php echo $row -> id; ?>",
            user_id: "<?php echo $_SESSION['user_id']; ?>",
            opiniao: textcontent
        };

        $("#flash").html('<span class="load">Aguarde por favor..</span>').fadeIn(800);
        $.ajax({
            type: "POST",
            url: '/echo/html/',
            data: {
                'html': input.value
            },
            cache: true,
            success: function (html) {
                $("#show").append('<div>' + html + '</div>');
                input.value = '';
                $("#flash").hide();
                input.focus();
            }
        });
        return false;
    });
});