I am tried to add A tinyMCE editor on an ajax facebox popup window but it doesn't show up. I referred to this link http://www.tinymce.com/forum/viewtopic.php?id=27754 but its not working in my code. I am using CodeIgniter platform.
my code is this
<script type="text/javascript">
jQuery(document).ready(function($) {
tinyMCE.init({
mode: "textareas",
theme : "simple",
editor_selector :"mceEditor"
});
$('a[rel*=facebox1]').facebox({
loadingImage : '<?php echo site_url();?>images/loading.gif',
closeImage : '<?php echo site_url();?>images/closelabel.png',
})
$('.edit_id').click(function(){
var news_id = $(this).attr('id');
$.ajax({
type:"POST",
url:"<?php echo base_url();?>news/GetnewsAjax/",
data:"id="+news_id,
success:function(msg){
//alert(msg);
$('#demo').html(msg);
tinyMCE.execCommand('mceAddControl', false, "news_article");
$(".myclass").trigger("click");
}
});
});
});
</script>
Please anyone help me to solve this problem