【问题标题】:How to solve the problem with TInyMCE in IE?如何解决 IE 中的 TInyMCE 问题?
【发布时间】:2009-02-14 12:27:41
【问题描述】:

我得到了这段代码来改变 textareas 以使用 TinyMCE 作为编辑器。它在 Firefox 中运行良好,但 IE 显示带有代码的简单文本区域。有人可以帮我做什么吗?

  print("<script language=\"javascript\" type=\"text/javascript\" src=\"jscripts/tiny_mce/tiny_mce.js\"></script>");


  echo('<script type="text/javascript">tinyMCE.init({   theme : "advanced", mode : "textareas",
   plugins : "safari,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_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,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : "true",
   });</script>');
  echo("</head>\n");

这是 IE 所说的(代码):

<script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script><script type="text/javascript">tinyMCE.init({ theme : "advanced", mode : "textareas",
   plugins : "safari,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_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,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : "true",
   });</script>

IE 中的错误表示它在第 17 行和第 4 个字符上需要标识符、字符串或整数。

【问题讨论】:

  • 你应该发布 HTML 输出,而不是你的 PHP
  • 另外请发布任何 IE 错误消息

标签: internet-explorer tinymce


【解决方案1】:

您的 JSON 中有一个额外的逗号 - 大括号前不允许有逗号。

改变

theme_advanced_resizing : "true",

theme_advanced_resizing : "true"

它应该可以工作

【讨论】:

    猜你喜欢
    • 2018-08-06
    • 1970-01-01
    • 2012-05-24
    • 2010-09-17
    • 1970-01-01
    • 1970-01-01
    • 2010-10-23
    • 2015-09-03
    • 1970-01-01
    相关资源
    最近更新 更多