I am trying to use jquery version of latest tiny mce -TinyMCE 3.5b3 jQuery package, for my textarea. I create a popup to load the form and here is the problem - after the first load, if you click on the same load popup button again, the ajax load
will break.
Here is the link to see what I mean.
However, I tested with another ajax load
without a popup, then the jquery ajax will just work fine.
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;
});
the plugin of $('textarea.tinymce').get_tinymce();
is in jsfiddle.