2012-05-30 5 views
1

jQuery를 사용하여 페이지를로드 할 때 문제가 발생하지 않지만 표시 할 텍스트 영역이있는 페이지를로드 할 때 문제가 발생하지 않습니다.tinymce (AJAX)가있는 페이지로드

$.ajax({ 
type: "POST", 
url: 'textarea.php', 
data: {data: info}, 
async: false, 
beforeSend: function() { 
}, 
complete: function() { 
},   
cache: false, 
success: function(result) { 
    $('#form-area').html(result); 
} 
error: function(error) { 
alert("Some problems have occured. Please try again later: " + error); 
} 

});

+0

코드를 얻을 수 있습니까? 지금까지 무엇을 시도 했습니까? – Thariama

답변

2

ajax 요청의 html 코드가 dom에 삽입 된 직후 tinymce.init 함수를 호출해야하는 것처럼 보입니다. 당신 또는 당신은 당신이 아약스를 사용하여 에디터 인스턴스를 다시로드 할 경우에 TinyMCE에 편집기 인스턴스를 종료해야 명심해야 할

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

호출 할 수 있습니다. 이 경우에 사용

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

모드 : "textareas", 테마 : "고급", editor_selector : "mceEditor", editor_deselector : "mceNoEditor", // editor_id를 class_name으로 변경할 수 있습니까 ?? – leo0110

+0

편집기는 기본 html 요소 (일반적으로 텍스트 영역)의 ID를 사용하므로 해당 id를 적절하게 변경할 수 있습니다 – Thariama