下面是我如何在 index.php 中创建 CKeditor(我将它与 CKfinder 一起使用):
< textarea id="text" name="text" >
< /textarea >
       <?php
        include_once 'ckeditor/ckeditor.php';
        require_once 'ckfinder/ckfinder.php' ;
        $ckeditor = new CKEditor();
        $ckeditor->basePath  = 'ckeditor/' ;
        CKFinder::SetupCKEditor( $ckeditor, 'ckfinder/' ) ;
        $config['height'] = '300';
        $ckeditor->editor('text', $initialValue, $config);
        ?>
并通过此按钮将编辑器的值提交给下面的 ajax 函数:
(  < a onclick="submit();" > Send < /a >   == >这完美地调用了ajax函数)
 function submit()
    {
    var textbox= CKEDITOR.instances.text.getData();
    $.ajax({
            type: "POST",
            url: "index2.php",
            data: "textbox="+textbox,
            error: function(){
              alert('Error while loading');
          },
                success: function(data){
                $('#content').html(data);
      }
      });
}
在 index2.php 我试图将值作为
   $textbox= $_POST['textbox'];
它没有用。我也试图通过
   $textbox= stripslashes($_POST['textbox']) ;
   $textbox=mysql_real_escape_string($textbox);
它也没有工作。我不知道如何处理这个问题。任何想法将不胜感激