The "editor" you are talking about is nothing more than:
<form action="<?= $_SERVER["PHP_SELF"] ?>" method="POST">
<input type="submit">
<textarea name="code"><?= htmlentities($_POST["code"]) ?></textarea>
<div id="output">
<?= $_POST["code"] ?>
</div>
And submitting a PHP form can even be replaced with:
<button onclick='$("#output").html( $("textarea#code").value )'>
mario source
share