2011-03-30 3 views
1

내 페이지에 2 명의 편집자가 있습니다. 단추를 클릭하면 해당 단추를 사용할 수 없게됩니다.tinymce 편집기 및 표시 텍스트 사용 안 함 (HTML이 아님)

가능하면 정규 텍스트 영역이되고 html이 아닌 일반 텍스트로 된 inise 텍스트를보고 싶습니다.

나는 비활성화에 대한 다른 질문을보고 있지만이 일을 ..

이 내 코드입니다하지 않았다 :

function create_text_editor() 
    { 
      $('#remarks1').tinymce(
      { 
        script_url : 'resources/tinymce/jscripts/tiny_mce/tiny_mce.js', 
        theme : "advanced", 
        theme_advanced_buttons1 :   "cut,copy,paste,|,bold,italic,underline,|,undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|" , 
        theme_advanced_buttons2 :   "formatselect,fontselect,fontsizeselect,|,forecolor,backcolor,|", 
        theme_advanced_buttons3 :   "", 
        theme_advanced_toolbar_location : "top", 
        theme_advanced_toolbar_align : "left", 
        plugins :       "paste" ,    
        oninit : on_editor_init          }); 

      $('#remarks2').tinymce(
      { 
        script_url : 'resources/tinymce/jscripts/tiny_mce/tiny_mce.js', 
        theme : "advanced", 
        theme_advanced_buttons1 :   "cut,copy,paste,|,bold,italic,underline,|,undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|" , 
        theme_advanced_buttons2 :   "formatselect,fontselect,fontsizeselect,|,forecolor,backcolor,|", 
        theme_advanced_buttons3 :   "", 
        theme_advanced_toolbar_location : "top", 
        theme_advanced_toolbar_align : "left", 
        plugins :       "paste" ,     
        oninit : on_editor_init    }); 
    } 

'on_editor_init'emtpy된다.

어떤 도움 appritiated됩니다

감사의 사전.

답변

1

저장 기능을 호출하고 주석을 종료해야합니다. 이제 TinyMCE에의 UI 버튼 (난 당신이 어떻게 작동하는지 알 것 같아요)

tinymce.get(editor_id).save(); 

tinymce.execCommand('mceRemoveControl', true, editor_id); 

을 밀어 때 물론이 코드를 실행할 수 있습니다, 당신은 TinyMCE에 초기화하기 전에 웹 사이트에왔다 텍스트 영역을 볼 수 있어야합니다.