【发布时间】:2014-09-02 13:27:01
【问题描述】:
我在 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'}
]
});
});
【问题讨论】:
-
一年多之后,谷歌搜索让我直接回到这个页面并立即修复,这正是人们应该回答自己的问题的原因,你永远不知道谁可能需要它!
标签: jquery twitter-bootstrap path tinymce relative-path