【问题标题】:Tinymce editor ErrorTinymce 编辑器错误
【发布时间】:2010-09-07 11:25:25
【问题描述】:
 <!DOCTYPE html PUBLIC "-//W3C//DTD
 XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html
 xmlns="http://www.w3.org/1999/xhtml">
 <head> <title>Full featured
 example</title> <script
 type="text/javascript"
 src="../tiny_mce/tiny_mce.js"></script>
 <script type="text/javascript">
 tinyMCE.init({
     mode : "textareas",
     theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,undo,redo,separator,bullist,numlist,separator,cut,copy,paste,separator,link,unlink,separator,code,separator,image,formatselect",
     theme_advanced_buttons2 : "",
     theme_advanced_buttons3 : "",
     plugins : "imagemanager", 
     document_base_url : "http://localhost/htmllatest/admin",
     relative_urls : false, 
     content_css : "css/content.css",  relative_urls : false, 
         remove_script_host : false, }); </script> </head> <body> <form
 method="post" action="somepage">
  <textarea name="content"
 style="width:100%">  </textarea>
 </form> </body> </html>

这是我的 tinyeditor 代码。但它不起作用。Firefox ErrorConsole 显示错误 Tinymce 未定义。请告诉我为什么这不起作用

【问题讨论】:

    标签: javascript tinymce rte


    【解决方案1】:

    首先确定tiny_mce.js 是否存在并被加载。

    您可以使用Firebug 并查看其“网络”选项卡(屏幕截图here

    【讨论】:

    • 我的电脑中没有安装 Fire.. 让我这样做
    • 但是这样的错误在错误控制台中显示无效量词 +;q=p}}return o},split:function(u,s,y){var z=this,o=z .createRng(),v,q,x;函数 p(A){var t,r=A.childNodes;if(A.nodeType==1&&A.getAttribute("_mce_type")=="bookmark"){return} for(t=r.length-1;t>=0;t--){p(r[t])}if(A.nodeType!=9){if(A.nodeType==3&&A.nodeValue.length >0){return}if(A.nodeType==1){r=A.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("_mce_type ")=="bookmark"){A.parentNode.insertBefore(r[0],A)}if(r.length|| 源文件:localhost/htmllatest/admin/tinymce/jscripts/tiny_mce/… 行:1
    • @user 下载一个新的、未压缩的 TinyMCE 版本并尝试使用它。
    【解决方案2】:

    听起来 tinyMCE 库尚未包含在您的页面中。检查您的 src 是否正确,并且文件是使用 Firefox 中的 Firebug 之类的东西加载的。

    【讨论】:

      【解决方案3】:

      听起来像是缩小版的 TinyMCE 搞砸了,尝试只加载 tiny_mce_src.js 以确保一切正常...

      【讨论】:

        【解决方案4】:

        插件文件夹中没有插件图像管理器。删除插件行并修复问题。

        【讨论】:

          猜你喜欢
          • 2020-09-06
          • 1970-01-01
          • 2011-12-06
          • 1970-01-01
          • 1970-01-01
          • 2017-12-06
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多