TinyMCE的是未定义 [英] tinymce is undefined

查看:1564
本文介绍了TinyMCE的是未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在ASP.NET页面内容使用TinyMCE的。当我在VisualStudio2008运行的code工作。当我把它部署到IIS我得到一个JavaScript错误错误:tinyMCE的未定义

 <脚本SRC =TinyMCE的/ jscripts / tiny_mce / tiny_mce.js类型=文/ JavaScript的>< / SCRIPT>
<脚本类型=文/ JavaScript的>
tinyMCE.init({
        //常规选项
        模式:文字区域
        主题:高级,
        插件: \"autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,$p$pview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template\",        //主题选项
        theme_advanced_buttons1: \"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect\",
        theme_advanced_buttons2: \"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,$c$c,|,insertdate,inserttime,$p$pview,|,forecolor,backcolor\",
        theme_advanced_buttons3: \"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen\",
        theme_advanced_buttons4: \"insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage\",
        theme_advanced_toolbar_location:顶,
        theme_advanced_toolbar_align:左,
        theme_advanced_statusbar_location:底,
        theme_advanced_resizing:真实,        //皮肤选项
        皮肤:o2k7
        skin_variant:银子,        //例内容的CSS(应该是您的网站的CSS)
        content_css:CSS / example.css        //跌落列出的链接/图像/媒体/模板对话框
        template_external_list_url:JS / template_list.js
        external_link_list_url:JS / link_list.js
        external_image_list_url:JS / image_list.js
        media_external_list_url:JS / media_list.js        //为模板插件替换值
        template_replace_values​​:{
                用户名:一些用户,
                STAFFID是:991234
        }
});
< / SCRIPT>
< textarea的ID =txtareaEmailEditorNAME =内容行=30COLS =100=服务器>< / textarea的>

编辑:我跑萤火虫,净选项卡下看了看,它有

GET tiny_mce.js 503服务不可用

更新我搬到脚本的应用程序文件夹,并且摆脱了503错误,但我仍然得到TinyMCE的未定义的错误。

 <脚本SRC =tiny_mce.js类型=文/ JavaScript的>< / SCRIPT>

这是我在IIS中的地址
HTTP://svr-app-d1/MailServiceWeb/EmailTemplateEditor.aspx


我从一位资深开发一些帮助在这里和他做了这些变化,现在的工作
IIS - > ASP EnableParentPaths = TRUE
IIS - 启用>处理程序映射StaticFile


解决方案

我从一位资深开发一些帮助在这里和他做了这些变化,现在的工作IIS - 启用>处理程序映射StaticFile < - > ASP EnableParentPaths = TRUE IIS / p>

I'm trying to use tinymce in an ASP.NET content page. The code works when I run it in VisualStudio2008. When I deploy it to IIS I get a javascript error 'Error: 'tinyMCE' is undefined'

<script src="tinymce/jscripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>
<script type="text/javascript">
tinyMCE.init({
        // General options
        mode : "textareas",
        theme : "advanced",
        plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

        // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,

        // Skin options
        skin : "o2k7",
        skin_variant : "silver",

        // Example content CSS (should be your site CSS)
        content_css : "css/example.css",

        // Drop lists for link/image/media/template dialogs
        template_external_list_url : "js/template_list.js",
        external_link_list_url : "js/link_list.js",
        external_image_list_url : "js/image_list.js",
        media_external_list_url : "js/media_list.js",

        // Replace values for the template plugin
        template_replace_values : {
                username : "Some User",
                staffid : "991234"
        }
});
</script>


<textarea id="txtareaEmailEditor" name="content" rows="30" cols="100" runat="server" ></textarea>

EDIT: I ran firebug and looked under the net tab and it had

GET tiny_mce.js 503 Service Unavailable

UPDATE I moved the script to the application folder and that got rid of the 503 error but I still get the tinymce undefined error.

<script src="tiny_mce.js" type="text/javascript"></script>

here's my address in IIS http://svr-app-d1/MailServiceWeb/EmailTemplateEditor.aspx


I got some help from a senior dev here and he made these changes and it works now IIS -> ASP EnableParentPaths=true IIS -> Handler Mappings StaticFile enabled

解决方案

I got some help from a senior dev here and he made these changes and it works now IIS -> ASP EnableParentPaths=true IIS -> Handler Mappings StaticFile enabled

这篇关于TinyMCE的是未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆