如何在IE中解決TInyMCE的問題?

[英]How to solve the problem with TInyMCE in IE?


I got this code to alter textareas to use TinyMCE as editor. It works fine in Firefox, but IE shows the simple textarea with the code in it. Can someone help me what to do?

我得到這個代碼來改變textareas使用TinyMCE作為編輯器。它在Firefox中運行良好,但IE顯示了帶有代碼的簡單textarea。有人可以幫我做什么嗎?

  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");

This is what IE says (code):

這就是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>

The error in IE says that it's expecting the identifactor, string, or integer on 17th row and 4th character.

IE中的錯誤表示它期望第17行和第4個字符上的識別器,字符串或整數。

1 个解决方案

#1


You have an extra comma in your JSON - you're not allowed a comma before the close-brace.

你的JSON中有一個額外的逗號 - 在閉括號之前你不允許使用逗號。

Change

theme_advanced_resizing : "true",

to

theme_advanced_resizing : "true"

and it should work

它應該工作


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/02/14/2b9fdc280c5fc96a6749c6f1970a856b.html



 
  © 2014-2022 ITdaan.com 联系我们: