Hi All
I'm using TinyMCE on the text-areas in my Magento admin section. I have my TinyMCE editor visible form the start, but I want the option to disable/re-enable it.
I'm using the jQuery plugin version, so I added some script, which is almost working. However, it's only affecting the first instance of TinyMCE - if there are any other instances of it on the page, they are not affected.
Any ideas why? Here's my code:
var $j = jQuery.noConflict();
// Add ON OFF toggle switch
$j(function() {
$j('textarea').after("<br/><span class=\"toggle form-button\">Toggle TinyMCE</span>");
$j("span.toggle").toggle(function(){
$j('.wrapper').find('textarea').tinymce().hide();
}, function () {
$j('.wrapper').find('textarea').tinymce().show();
});
});