SP中如何将页面模板中使FCKeditor的内容提交到controller类

#1 xim1119

spcontrollerpublic function articleEditPage(){
...   import(APP_PATH.'/include/fckeditor/fckeditor.php');
   $editorObj = new FCKeditor('contents');
   $editorObj->BasePath = './include/fckeditor/';    // 修改相对地址
   $editorObj->InstanceName = 'editorContent';
   $editorObj->Value = $this->articleinfo['content'];
   $this->editor = $editorObj->CreateHtml();
        }else{
            $this->jump(spUrl("article", "articleListPage"));
        }
        $this->display("article/edit.html");
    }  template中...
...
   
   
   
   
<{$editor}>
   如何在articleEditAction中获取修改后提交的fck内容?用$this->spArgs(?)?

2011-08-31 16:45:31

#2 jake

对,用$this->spArgs('contents');

因为前面是 $editorObj = new FCKeditor('contents');

如果不确定,可以dump($this->spArgs()); 看看全部的提交参数哪个是你需要的。

2011-08-31 17:27:57

#3 xim1119

jake,真不好意思,我上面提交的内容有点乱,你都这么快就给了建议,问题已经解决了。
...
$editorObj->InstanceName = 'editorContent';
...
用$this->spArgs( 'editorContent')可以获取提交的数据

2011-09-01 13:46:30

#4 jake

好的

2011-09-01 16:02:06