我来接分 看这个
http://www.syszedu.net/jiang/dragon/1752.htm

解决方案 »

  1.   

    /*   php 部分
    <?php
    if($submit){
    if (!empty($f_introduction)) {
      $f_introduction=str_replace("\n","<br>",$f_introduction);
      $f_introduction=str_replace("|","│",$f_introduction);
      $f_introduction=str_replace("\t","",$f_introduction);
      $f_introduction=str_replace("\r","",$f_introduction);$sql="insert into site_con (con) values ('$f_introduction')";
    $res=mysql_query($sql);}
    ?>
    /*   javascript 部分<script>
    function MM_openBrWindow(theURL,winName,features) {
      window.open(theURL,winName,features);
    }
    function openpick() {
            MM_openBrWindow("pickpic.php",'upload','location=no,status=yes,scrollbars=yes,resizable=yes,width=450,height=300');
    }
    function replace(string,text,by) { 
            if (string.length==0 || text.length==0) return string;
            var i = string.indexOf(text);
            if (((!i) && (text != string.substring(0,text.length))) || (i== -1)) return string;
            var newstr = string.substring(0,i) + by;
            if (i+text.length < string.length) newstr += replace(string.substring(i+ text.length, string.length), text, by);
            return newstr;
    }function e2c(text) {   text=replace(text,"<BR>","\n");
            text=replace(text,"<P>","");
            text=replace(text,"</P>","\n");
            text=replace(text,"STRONG>","B>");
            text=replace(text,"EM>","I>");
            text=replace(text,"/UL>\r\n","/UL>");
            text=replace(text,"/OL>\r\n","/UL>");
            text=replace(text,"#SCRIPT#","<SCRIPT>");
            text=replace(text,"#/SCRIPT#","</SC"+"RIPT>");        return text;
    }
    function copyedittocontent(){
            text=e2c(document.frames['edit'].getHTML());
            document.all.f_introduction.value=text;
    }
    //-->
    </script>
    /*   html 部分<form name="form1" method="post" action=""><iframe id="edit" src="editor_sm.html" width="100%" height=320 marginwidth=0 marginheight=0 frameborder=0 style="border: 0px #fff solid;"></iframe>    /*   调入html编辑器<input type='submit' name='submit' value='发表文章' class='button' onclick="copyedittocontent();"></form>
      

  2.   

    存数据的时候用
    $editor 变量实实