Jquery TinyMCE 404/未定义
我正在Q/a应用程序中使用TinyMCE和TwitterBootstrapV3.1 由于某些原因,我从控制台中的TinyMCE收到多个404错误:Jquery TinyMCE 404/未定义,jquery,twitter-bootstrap,path,tinymce,relative-path,Jquery,Twitter Bootstrap,Path,Tinymce,Relative Path,我正在Q/a应用程序中使用TinyMCE和TwitterBootstrapV3.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
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/
tinyMCE.baseURL=“/assets/lib/tinyMCE”代码>
tinyMCE.baseURL=“/application/assets/lib/tinyMCE”代码>
tinyMCE.baseURL=“localhost/application/assets/lib/tinyMCE”代码>
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标记之前,而不是之后
<doctype html>
<head>
<script src="/assets/lib/TinyMCE/tinymce.min.js"></script>
</head>
<body>
<div class="container" role="main">
<textarea id="tinymce"></textarea>
</div>
</body>
<script>
$(document).ready(function() {
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'}
]
});
});
</script>
</html>
$(文档).ready(函数(){
tinymce.init({
选择器:“textarea#tinymce”,
主题:“现代”,
//宽度:400,
身高:300,
插件:[
“advlist autolink link list charmap打印预览hr锚定页面中断拼写检查器”,
“searchreplace wordcount visualblocks visualchars代码全屏插入日期时间非中断”,
“保存上下文菜单方向性表情模板粘贴文本颜色”
],
content_css:“../assets/css/bootstrap.css”,
工具栏:“insertfile undo redo | styleselect |粗体斜体|对齐左对齐中心对齐右对齐对齐对齐bullist numlist前景色|凹痕缩进| l墨水|”,
样式和格式:[
{标题:“粗体文本”,内联:“b'},
{标题:'Red text',内联:'span',样式:{color:'#ff0000'}},
{title:'Red header',block:'h1',style:{color:'#ff0000'}},
{title:'example1',inline:'span',classes:'example1'},
{title:'example2',inline:'span',classes:'example2'},
{title:'表格样式'},
{title:'Table row 1',选择器:'tr',类:'tablerow 1'}
]
});
});
t文本区域标记前应包含字母,而不是后面的字母
<doctype html>
<head>
<script src="/assets/lib/TinyMCE/tinymce.min.js"></script>
</head>
<body>
<div class="container" role="main">
<textarea id="tinymce"></textarea>
</div>
</body>
<script>
$(document).ready(function() {
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'}
]
});
});
</script>
</html>
$(文档).ready(函数(){
tinymce.init({
选择器:“textarea#tinymce”,
主题:“现代”,
//宽度:400,
身高:300,
插件:[
“advlist autolink link list charmap打印预览hr锚定页面中断拼写检查器”,
“searchreplace wordcount visualblocks visualchars代码全屏插入日期时间非中断”,
“保存上下文菜单方向性表情模板粘贴文本颜色”
],
content_css:“../assets/css/bootstrap.css”,
工具栏:“insertfile undo redo | styleselect |粗体斜体|对齐左对齐中心对齐右对齐对齐对齐bullist numlist前景色|凹痕缩进| l墨水|”,
样式和格式:[
{标题:“粗体文本”,内联:“b'},
{标题:'Red text',内联:'span',样式:{color:'#ff0000'}},
{title:'Red header',block:'h1',style:{color:'#ff0000'}},
{title:'example1',inline:'span',classes:'example1'},
{title:'example2',inline:'span',classes:'example2'},
{title:'表格样式'},
{title:'Table row 1',选择器:'tr',类:'tablerow 1'}
]
});
});
仅仅一年多之后,谷歌搜索让我直接回到这个页面并立即修复,这就是为什么人们应该回答自己的问题,你永远不知道谁可能需要它!仅仅一年多之后,谷歌搜索让我直接回到了这个页面并进行了即时修复,这就是为什么人们应该回答自己的问题,你永远不知道谁可能需要它!