<textarea id="test" rows="20" cols="50"></textarea>
<Script Language="JavaScript">
var oImg=document.createElement("IMG");
oImg.src=" [url]http://www.2yup.com/asp/p_w_picpaths/asp_logo1.gif[/url] ";
test.appendChild(oImg);
</Script>
 
另外,一般网页编辑器的做法
 
<body οnlοad="edit.document.designMode='on'">
<IFRAME id=edit  marginWidth=0 marginHeight=0 src="about:blank" frameBorder=1 width="100%" height="100%"></IFRAME>
</body>