重置fck编辑器值yii

重置fck编辑器值yii,yii,Yii,我使用的是yii框架,我有fck编辑器。如果单击“重置”按钮,表单中的所有字段都将变为空,但编辑器不会。这是fck编辑器的代码 $this->widget('application.extensions.fckeditor.FCKEditorWidget',array( "model"=>$model, # Data-Model "attribute"=>'content', # Attribute in the D

我使用的是yii框架,我有fck编辑器。如果单击“重置”按钮,表单中的所有字段都将变为空,但编辑器不会。这是fck编辑器的代码

$this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
    "model"=>$model,                # Data-Model
    "attribute"=>'content',         # Attribute in the Data-Model
    "height"=>'400px',
    "width"=>'100%',

    "fckeditor"=>Yii::app()->basePath."/../fckeditor/fckeditor.php",
                                    # Path to fckeditor.php
    "fckBasePath"=>Yii::app()->baseUrl."/fckeditor/",
                                    # Relative Path to the Editor (from Web-Root)
    "config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',),
                                    # Additional Parameters
我该怎么做呢?

AFAIK FCKEditor(以及任何其他类似工具)基于简单的文本框(HTML元素textarea)

如果您使用jQuery,我会考虑添加一个简单的代码到视图中的OnDoCutoTeNoRead函数中,该视图是在重置窗体之后生成的(或者直接重置按钮的OnCalk代码,如果您在复位后没有重新加载页面)。在这段代码中,我将简单地强制使用作为FCKEditor基础的字段,以确保它为空

大概是这样的:

$('#editor').val('');

从内存中写入,但未测试。

似乎这不是yii问题,但fckeditor,可能设置存储在cookie中?