2011-09-05 6 views
1

도와주세요. 인라인 편집기로 tinyMCE를 사용합니다. 편집 모드에서 사용자가 엔터를 입력하면 <br />이 아닌 <p>이됩니다. 매뉴얼 및 FAQ를 읽고 시도해보십시오.tinyMCE에서 p로 br 변환

tinyMCE.init({ 
      'height' : '100%', 
      'widht':'100%', 
      'content_css' : styles + ',/sdtc-new/nc/interface/common/css/mce-editor.css', 
      'mode' : "specific_textareas", 
      'editor_selector' : prefix + o.id, 
      'theme':'advanced', 
     theme_advanced_buttons1: o.buttons.join(','), 
     theme_advanced_buttons2 : "", 
     **theme_advanced_buttons3 : "", 
    force_br_newlines : true, 
     force_p_newlines : false, 
     forced_root_block : '' // Needed for 3.x** 
     }); 

그러나 작동하지 않습니다. 사실 편집 영역에있는 모든 컨테스트를 삭제하고 새 텍스트를 입력하는 것과 같은 작업입니다. 하지만 나는 그것이 항상 작동해야합니다. 도와주세요. TinyMCE에 3.4.4

답변

1

의 버전 당신은 TinyMCE에 대한 FAQ

tinyMCE.init({ 
    forced_root_block : false, 
    force_br_newlines : true, 
    force_p_newlines : false 
    ... 
}); 

Here is a helpfull section 설정해야합니다.

+0

올바른 순서가 맞지 않으십니까? 나는이 지시어들을 다른 순서로 사용하기 때문에. – ZigZag

+0

순서는 중요하지 않지만 ''는 거짓이 아닙니다! – Thariama

+0

console.log (''== false); // true – ZigZag

관련 문제