我想使用jquery版本的最新的微小mce - TinyMCE 3.5b3 jQuery package,爲我的textarea。我創建一個彈出窗口來加載表單,這裏是問題 - 在加載第一個後,如果再次點擊相同的加載彈出按鈕,ajax load
將會中斷。TinyMCE彈出與jquery加載
這裏是link看我的意思。
但是,我測試了另一個AJAX load
沒有一個彈出窗口,然後jQuery的AJAX將工作正常。
jquery的,
$('.button-popup').click(function(){
var object = $(this);
// Remove any previous popup first.
$(".popup").remove();
// Now prepend a fresh popup.
$(document.body).prepend("<div id='popup-edit' class='popup'></div>");
// Load the content into the popup.
$('#popup-edit').load('full.html', {}, function(){
$('#binder-form').prepend("<div class='close'><a href='#' class='button-close'> x close </a></div>");
$('#binder-form').css({
padding:"20px",
backgroundColor:"#ffffff"
});
$('textarea.tinymce').get_tinymce();
$('form *[title]').inputHints();
$('.button-submit').submit_form();
$('.close').click(function(){
$('.popup').fadeOut('fast',function(){
//$(this).remove();
});
return false;
});
});
return false;
});
$('.button').click(function(){
$('.content').load('full.html', function() {
$('textarea.tinymce').get_tinymce();
$('form *[title]').inputHints();
$('.button-submit').submit_form();
});
return false;
});
的$('textarea.tinymce').get_tinymce();
插件處於jsfiddle。
感謝您的答案,「嘗試將其包裝在try catch塊中,看看爲什麼」 - 我該怎麼做? – laukok 2012-04-15 19:50:23
http://www.impressivewebs.com/javascript-try-catch/ – ArtBIT 2012-04-15 19:57:57
這可能是一個問題,他們可能會在代碼中輸入錯誤。我已經提交了一個[bug報告](http://www.tinymce.com/develop/bugtracker_view.php?id=5145),我們將看看它是如何發展的。 – ArtBIT 2012-04-15 20:16:40