<div contenteditable style="border:inset">
<pre>
asdfasdf
asdfasdf
<img src=http://expert.csdn.net/images/csdn.gif></img>
asasdfasdf
</pre>
</div>

解决方案 »

  1.   

    在TextArea中可以包含任何对象的实现方法
    http://www.blueidea.com/bbs/newsDetail.asp?id=616345
      

  2.   

    可是,在textarea中的文字链接还是不好使啊。
    谢谢,帮我看看吧。
    源码如下:<div id="aaa">
      <font color="#0066FF" size="5">这是</font><font size="5"><i>在</i><font color="#FF0000" size="6"><b>TextArea</b></font>中<font face="Arial, Helvetica, sans-serif">插入</font><font color="#0000FF">HTML</font>、<font color="#0000FF">图片</font>和<font color="#0000FF">表格</font>的<font color="#FF00FF"><i>效果</i></font></font>
      <br>
      <b><font color="#FF0000">还可以改变图片和表格的大小</font></b>
      <br><img src="http://www.blueidea.com/bbs/images/bbtitle.gif"><img src="http://www.blueidea.com/bbs/images/q1.gif">
      <br><img src="http://www.blueidea.com/ad/edong/banner.gif">
      <table width="292" border="1" cellspacing="0" cellpadding="0">
        <tr bgcolor="#CCCCFF"> 
          <td width="63">&nbsp;</td>
          <td width="147">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>表格里也<b><font color="#FF0000">可以</font></b>打字</td>
        </tr>
      </table>
    <a href=aasdf.htm>sklfjd</a>
    </div>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head><body>
    <textarea id="editor" name="textarea" cols="80" rows="15" onSelect=""></textarea>
    <br>
    <br>
    <script language="JavaScript">
       Obj = document.getElementById("aaa");
       editor.appendChild(Obj);
    </script></body>
    </html>
      

  3.   

    <a onclick="if(this.isContentEditable)window.open(this.href)" href=aasdf.htm>sklfjd</a>