开发者

tinymce b.editor is null, this.params is undefined on FF

I am integrating tinymce with an application am developing using zend framework.

Here is the code:

<!-- Load TinyMCE -->
<script type="text/javascript" src="<?php echo $this->baseUrl()?>/js/tinymce/jquery.tinymce.js"></script>
<script type="text/javascript">
    $().ready(function() {
        $('textarea.editor').tinymce({
            // Location of TinyMCE script
            script_url : '<?php echo $this->baseUrl()?>/js/tinymce/tiny_mce_src.js',

            // General options
            theme : "advanced",
            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,visual开发者_StackOverflowaid,|,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_statusbar_location : "bottom",
            theme_advanced_resizing : true
        });
    });
</script>
<!-- /TinyMCE -->

This is working fine on Chrome. However on FF its printing the following error:

b.editor is null
var tinymce=null,tinyMCEPopup,tinyMCE;...yMCEPopup.init();tinyMCEPopup._wait();
tiny_mce_popup.js (line 5)
this.params is undefined
var tinymce=null,tinyMCEPopup,tinyMCE;...yMCEPopup.init();tinyMCEPopup._wait();
tiny_mce_popup.js (line 5)

I am not sure why. Am checking that non of the files are giving 404 or any other http errors so if all the scripts are loaded, what is causing this error?


I strongly advise to not to use the jQuery build! It is really slow when handling typing inputs. It is better to include the jQuery library first and then the regular tinymce library.

Another thing which will help you to debug your code is to include the development build, which uses the not minified files thus yielding to easier tracable code for debugging. This is what i use

<script type="text/javascript" src="http://myserver/js/jquery/jquery.js"></script>
<script type="text/javascript" src="http://myserver/js/tiny_mce/tiny_mce_dev.js"></script>

Initialization takes place using:

tinyMCE.init({
  mode: "textareas", // none, textareas, exact, ...
  theme: "advanced", // also simple available

  ...
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜