2012-04-28 4 views
0

저는 yii 프레임 워크를 사용하고 있습니다. 나는 형식의 fck 편집기를 가지고 있습니다. 재설정 버튼을 클릭하면 양식의 모든 필드가 비어 있지만 편집기가 표시되지 않습니다. fck 편집기의 코드입니다.재설정 fck 편집기 값 yii

$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 

어떻게 할 수 있습니까?

+1

이게 yii 문제는 아니지만 fckeditor 인 것 같습니다. 아마도 쿠키에 설정이 저장되어 있습니까? – llamerr

답변

0

AFAIK FCKEditor (및 기타 유사한)는 간단한 텍스트 상자 (HTML 요소 텍스트 영역)를 기반으로합니다.

jQuery를 사용하는 경우 폼을 다시 설정하거나 (리셋 버튼의 onClick 코드에 직접 생성 된 뷰에서 onDocumentReady 함수에 간단한 코드를 추가하는 것을 고려할 것입니다. 페이지 재설정 후). 이 코드에서는 FCKEditor의 기본으로 사용되는 필드가 비어 있는지 확인하기 만하면됩니다. 이 같은

뭔가 :

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

메모리에서 서면,하지만 테스트하지.