未捕获的ReferenceError:tinymce

时间:2018-03-14 15:41:15

标签: javascript jquery tinymce

我正在使用以下代码来整合tinymce

<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.7.9/jquery.tinymce.min.js" ></script>

tinyMCE.init({
              mode : "textareas",
              theme : "advanced",
              plugins : "emotions,spellchecker,advhr,insertdatetime,preview",

              // Theme options - button# indicated the row# only
              theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
              theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
              theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions",
              theme_advanced_toolbar_location : "top",
              theme_advanced_toolbar_align : "left",
              theme_advanced_statusbar_location : "bottom",
              theme_advanced_resizing : true
          });

以下是我得到的错误

  

未捕获的ReferenceError:未定义tinyMCE

请帮我解决这个问题

2 个答案:

答案 0 :(得分:0)

我认为它不是tinyMCE.init,它应该是tinymce.init。

**注意tinyMCE(大写)和tinymce(小)的变化。

答案 1 :(得分:0)

JavaScript中对变量的引用区分大小写。将tinyMCE替换为tinymce