我看网上很多介绍动态创建fckeditor编辑框的,但都是新窗口打开,如何点击一个按钮,创建到当前页面的某个位置呢??可以吗???

解决方案 »

  1.   

    另外,JS版的还有一个功能函数就是ReplaceTextarea()函数,可以替换指定的TextArea,拿我的网站的日志的回复部分示例:
    <script type="text/javascript">
    <!--
    function showFCK()
    {
    var oFCKeditor = new FCKeditor('fbContent');
    oFCKeditor.BasePath = '/';
    oFCKeditor.ToolbarSet = 'Basic';
    oFCKeditor.Width = '100%';
    oFCKeditor.Height = '200';
    oFCKeditor.Value = '';
    //oFCKeditor.Create() ;
    oFCKeditor.ReplaceTextarea();
    //document.blog_feedback.blogsubmit.disabled = '';
    document.blog_feedback.blogsubmit.style.display = '';
    document.blog_feedback.openFCK.disabled = 'true';
    document.blog_feedback.openFCK.style.display = 'none';
    }
    //-->
    </script>
      

  2.   

    多谢,已经成功了,我做的程序估计跟你目前用的差不多,就是一个页面里有很多按钮,可以点击回复,直接在点击位置打开一个Textarea区域,这些区域是隐藏的,其实都已经存在,所以如果一个页面加载n多FCKeditor输入框的话,会很慢,我想让用户点击哪个回复就在哪里新建一个,这样默认都是Textarea速度就会快很多,现在又有新问题了,用户如果挨个点击,会新建很多FCKeditor输入框 ,我以前的点击回复是打开Textarea区域,再次点击就隐藏了,FCKeditor输入框可以注销吗,就是变回Textarea区域?