在FF下也有BUG。
梅花老大是大牛。

解决方案 »

  1.   

    在ie下一样关闭不了。估计本来就没打算让你关。自己用fkedit就好了,以前不用它是因为他不支持<br>换行,现在支持了。首选fkedit。
      

  2.   

    改了一段它原来屏蔽的小段代码,现在firefox下可以正常跑了。但是不知道老大为什么把那段代码故意屏蔽掉,没有改,不知道是不是在其他的浏览器上会有问题,我本地只有firefox和ie,所以暂时是测试不了了CsdnUbbEditor.prototype.wraptag=function(open, close)
    {
      this.editor.focus();
      if(document.selection)
      {
        if(this.selection.range)
        {
          this.selection.range.text = open +this.selection.range.text + close;
          this.selection.range.select();
        }
      }
      else if(this.editor.selectionEnd)
      {
        var ss = this.selection.start;
        var se = this.selection.end;
        var st = this.selection.top;
    //alert(this.selection.start + " - " + this.selection.end + " - " + this.selection.top)
        if (ss <= se)
        {
          var s = this.editor.value;
          var left   = s.substring(0, ss);
          var center = s.substring(ss,se);
          var right  = s.substring(se,s.length);
          center = open + center + close;      this.editor.value = left + center + right;
          ss += center.length;
          this.editor.selectionStart = ss;
          this.editor.selectionEnd = ss;
          this.editor.scrollTop = st;
        }
      }
      else
      {
        this.editor.value += open + close;
      }
    }CsdnUbbEditor.prototype.execCommand=function(e, ubbtag, trigger)
    {
      (window.event||e).cancelBubble=true;
      var e=CsdnUbbEditor.director[ubbtag];
      if ("undefined"==typeof(e)) return;  this.editor.focus();
      this.selection = {};
      if(document.selection)
      {
        var sel = document.selection;
        var rng = sel.createRange();
        if(rng && rng.parentElement() == this.editor) this.selection.range = rng;
      }
      else if(this.editor.selectionEnd)
      {
        this.selection.start = this.editor.selectionStart;
        this.selection.end   = this.editor.selectionEnd;
        this.selection.top   = this.editor.scrollTop;
      }
      else
      {
        //alert("your browser is not support Range");
        //return;
      }  var open=e.open, close=e.close;
      switch(ubbtag)
      {
        case "url" :
          var s=prompt("\u8f93\u5165\u5b8c\u6574\u7684\u94fe\u63a5\u5730\u5740","http://");
          if(s==null) return; open=open.format(s); break;
        case "email" :
          var s=prompt("\u8f93\u5165\u90ae\u4ef6\u5730\u5740\uff1a [email protected]","");
          if(!/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(s)) return;
          if(s==null) return; open=open.format(s); break;
        case "image" :
          var s=prompt("\u8f93\u5165\u56fe\u7247\u7684\u5b8c\u6574\u5730\u5740","http://");
          if(s==null) return; open=open.format(s); break;
        case "swf" :
          var s=prompt("\u8f93\u5165 FLASH \u6587\u4ef6\u7684 URL \u5730\u5740","http://");
          if(s==null) return; open=open.format(s); break;
        case "movie" :
          var s=prompt("\u8f93\u5165\u5f71\u97f3\u5a92\u4f53\u6587\u4ef6\uff08WMA\uff0cWMV\uff0cMP3\uff0cRM\uff0cRAM\u7b49\uff09\u7684 URL \u5730\u5740","http://");
          if(s==null) return; open=open.format(s); break;
        case "fontsize"  : this.fontsizelayer(trigger); return; break;
        case "code"  : this.codelayer(trigger); return; break;
        case "color" : this.colorlayer(trigger); return; break;
      }
      this.wraptag(open, close);
    };
      

  3.   

    其实我觉得这个编辑器还是比较简单的。。
    FCKeditor之类的编辑器,技术含量才比较高
      

  4.   

    public void getString() {
         return val;
    }
      

  5.   

    ForeColor="Blue" 好i