2014-06-13 2 views
0

편집을 위해 tinyMce에 콘텐츠를 설정하는 방법은 무엇입니까? 하지만 내용,cake의 tinyMCE - Plugin CakeDC/TinyMCE

Configure::write('TinyMCE.configs', array(
    'vinagro' => array(
     'mode' => 'textareas', 
     'theme' => 'advanced', 
     'editor_selector' => 'mceSimple', 
     'width' => 790, 
     'height' => 880, 
     'content' => "asdf", 
     'skin' => "o2k7", 
     'theme_advanced_toolbar_location' => "top", 
     'theme_advanced_buttons1' => 'fontselect,separator,bold,italic,underline,separator,justifyleft,justifycenter,justifyright,separator,bullist,numlist,separator,link,image,separator,undo,redo', 
     'theme_advanced_buttons2' => '', 
     'theme_advanced_buttons3' => '', 
     //'plugins' => 'pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount,advlist,autosave' 
    ), 
    )); 

편집기는로드 : 부트 스트랩

echo $this->TinyMCE->editor('vinagro'); 
echo '<textarea name="data[Article][content]" id="articleContent" class="mceSimple"></textarea>'; 

:. 내가보기에

에 내용을 추가 할 수있는 방법을 찾을 수 없습니다. 나는 콘텐츠를 추가하는 많은 방법을 시도했지만 결과는 없었다.

어떤 도움을 주셔서 감사합니다.

답변

0

나는 그것을 해결했다.

나는 항상 tinyMCE.activeEditor.setContent ("content"); 문서 준비. 하지만이 시간에 tinymce 초기화되지 않습니다, 그래서 창로드를 발견하고 작동합니다.

$(window).load(function(){ 
    tinyMCE.activeEditor.setContent("content"); 
})