TinyMCE 404 / undefined
我在Q / A应用程序中使用TinyMCE和Twitter Bootstrap v3.1。
出于某种原因,我在TinyMCE的控制台中收到了多个404错误:
GET http://localhost/assets/lib/TinyMCE/themes/modern/themeundefined.js 404 (Not Found) tinymce.min.js:3 Failed to load: /assets/lib/TinyMCE//themes/modern/themeundefined.js
据我所知,路径是正确的。 我已经直接在浏览器栏中输入了路径(没有undefinedtheme.js),然后弹出。
TinyMCE的完整路径是: http://localhost/application/assets/lib/TinyMCE/
- 我启用了mod-rewrite,我尝试过禁用但没有帮助。
- 我试过设置:
-
tinyMCE.baseURL = "/assets/lib/TinyMCE";
-
tinyMCE.baseURL = "/application/assets/lib/TinyMCE";
-
tinyMCE.baseURL = "localhost/application/assets/lib/TinyMCE";
-
我在TinyMCE常见问题解答中搜索了指向mod_rewrite的问题。
基本上是什么导致了undefinedtheme.js
事情?
我的TinyMCE发起人:
//TinyMCE Initiator //set scope $(document).ready(function() { tinyMCE.baseURL = "/assets/lib/TinyMCE"; tinymce.init({ selector: "textarea#tinymce", theme: "modern", /*width: 400,*/ height: 300, plugins: [ "advlist autolink link lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime nonbreaking", "save contextmenu directionality emoticons template paste textcolor" ], content_css: "../assets/css/bootstrap.css", toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify bullist numlist forecolor | outdent indent | l ink | ", style_formats: [ {title: 'Bold text', inline: 'b'}, {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}}, {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}}, {title: 'Example 1', inline: 'span', classes: 'example1'}, {title: 'Example 2', inline: 'span', classes: 'example2'}, {title: 'Table styles'}, {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} ] }); });
TinyMCE应该包含在textarea标签之前,而不是之后