In this forum the icons above will place tags (in “New Post” mode)
in this textarea and place the cursor in between.
I’ve made several attempts to duplicate this myself
I was just wondering if there is a simple script
for this.
Source code just does not tell me much.
This was my attempt:
[code=php]<?php
// code_maker.php
?>
<head>
<script type=”text/javascript”>
function getcode()
{
document.ftext.code_txt.value =
document.ftext.code_txt.value + document.ftext.bold.value;
}
</script>
</head>
<body onload=”document.ftext.code_txt.focus()”>
<form name=”ftext” method=”post”
action=”<?php $_SERVER[PHP_SELF]; ?>”>
<table><tr>
<td id=”left_side”>
<textarea name=”code_txt” rows=”25″ cols=”75″ onchange=”getcode”>
<?php echo $_POST[code_txt]; ?>
</textarea>
<input type=”submit” value=”enter”>
</td>
<td id=”right_side”>
<input type=”text” name=”bold” value=”<b></b>”
onclick=”getcode” disabled>
</td></tr></table>
</form>
</body>