文本编辑器没有加载,我不知道为什么。我有一个coldfusion页面,我把它包含在下面(请不要我在会话中工作)下面 部分。
<cfoutput>
<script type="text/javascript" src="#rootUrl#/#myPath#/tests/user/tinymce_4.0.8/tinymce/js/tinymce/tinymce.min.js"></script>
</cfoutput>
在此之下,我已经定义了包含CSS的样式:
<cfoutput>
<style>
@import url('#rootUrl#/#myPath#/css/first.css');
@import url('#rootUrl#/#myPath#/css/second.css');
@import url('#rootUrl#/#myPath#/css/third.css');
</style>
</cfoutput>
在此代码下方,我已经定义了可以在此处找到的启动代码(在“查看源代码”下):
http://www.tinymce.com/tryit/full.php
<script type="text/javascript">
tinymce.init({
selector: "textarea",
convert_urls: false,
theme: "modern",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor"
],
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
toolbar2: "print preview media | forecolor backcolor emoticons",
image_advtab: true,
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
</script>
我收到了以下错误,你能告诉我为什么会这样吗?
NetworkError: 404 Not Found - http://abc.xyz.com/Public/tests/user/tinymce_4.0.8/tinymce/js/tinymce/tinymce.min.js
ReferenceError: tinymce is not defined
tinymce.init({
请让我知道什么是错的。
P.S:我已经测试了编辑器,如果我只是创建一个简单的HTML页面甚至cfm页面并执行上面提到的内容(不包括rootURL定义步骤),它的工作正常。
答案 0 :(得分:1)
尝试在地址栏中输入“http://abc.xyz.com/Public/tests/user/tinymce_4.0.8/tinymce/js/tinymce/tinymce.min.js”(将abc.xyz.com更改为实际域名),看看脚本是否在浏览器中打印