Здесь есть несколько замечательных предложений, но я бы также предложил точно названное Hacker News . У них вообще есть много отличных статей по программированию.
Yo dawg.
Seriously, encoding the html is the only option. You can always decode it/do whatever in your server-side code once it gets posted.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test Embedded textareas</title>
</head>
<body>
<form method="POST">
<textarea>
Outside Textarea
<textarea>Inside Textarea</textarea>
</textarea>
<input type="submit" value="Submit" />
</form>
</body>
</html>
No. You can't do it. The only thing valid inside of a textarea is text. It's a textarea. :-)
Попробуйте это:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test Embedded textareas</title>
</head>
<body>
<textarea>
Outside Textarea
</textarea>
<textarea style="margin-top:-250px; height:250px;">Inside Textarea</textarea>
</body>
</html>
Why?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test Embedded textareas</title>
</head>
<style type="text/css">
#outside { position:absolute; top:0; left:0; z-index:0; width:400px;
height:400px }
#inside { position:absolute; top:100px; left:100px; z-index:1;
width:200px; height:200px; }
</style>
<body>
<div>
<textarea id="outside" rows="10" cols="80">
Outside Textarea
</textarea>
<textarea id="inside" rows="5" cols="60" readonly>
Inside Textarea
</textarea>
</div>
</body>
</html>
Рассматривали ли вы возможность использования FckEditor ?