Re: Indenting HTML code in a textarea by McKirahan
McKirahan
Sun Aug 28 13:01:20 CDT 2005
"martin.igle+ASP@gmail.com" <martin.igle@gmail.com> wrote in message
news:1125250515.761302.312330@z14g2000cwz.googlegroups.com...
> the question is simple... is there any way to indent HTML code inside a
> simple textarea?...
>
> tnx!
> martin
You can use Tabs or spaces with a fixed width font.
<html>
<head>
<title>ta_tab.htm</title>
</head>
<body>
<form name="form1">
<textarea name="text" cols="80" rows="10"></textarea>
<textarea name="area" cols="80" rows="10"
style="font-family:Courier">Hello World!</textarea>
</form>
<script type="text/javascript">
document.form1.text.value = "Hello\tWorld!";
</script>
</body>
</html>