2

I'm trying to use tinymce editor with facebox modal window. But tinymce doesn't load when the modal window is opened and I get no errors of Jscript in firebug

<script type="text/javascript">

 jQuery(document).ready(function($) {
     $('a[rel*=facebox]').facebox();
 })

 tinyMCE.init({ 
    theme : "advanced", 
    mode : "textareas", 
    plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist", 
    // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_resizing : true

});
</script>

any help?

Onur Kucukkece
  • 1,708
  • 1
  • 20
  • 46
  • some more information would be nice. do you receive any javascript errors (use firebug)? what happens if you use 'plugins: "". It is possible that an error in the config keeps tinymce shut down. Please post your full tinymce.init . – Thariama Nov 29 '10 at 06:42

1 Answers1

2

Now I'm working on another project and I had the same issue again

This time I used colorbox and put this code onComplete event of fancybox.

 $(".edit").colorbox({
    onComplete : function(){ tinyMCE.execCommand('mceAddControl', true, "textare_id"); },
    onClosed   : function(){ tinyMCE.execCommand('mceRemoveControl', true, "textare_id");}  
 });

and It worked thanks to gutch for his answer on TinyMCE - undefined 'e','j','t' when loading for a second time in fancyboxm

P.S. Tinymce init function defined in the index file of whole project

Community
  • 1
  • 1
Onur Kucukkece
  • 1,708
  • 1
  • 20
  • 46