开发者

TinyMCE sticks the themes/advanced/langs/en.js script tag randomly in source code

I have a few different applications that use TinyMCE and all experience the same problem... the pages (randomly it seems) show HTML source code to the user. When I use the inspector, I see that the reason is that I get an entire script embed tag pointing to the /themes/advanced/langs/en.js file put into the middle of another HTML element. I've seen it show up inside tables and links, and it's even getting submitted to the DB through the TinyMCE editors themselves.

I see no console logs with JS errors, and the problem happens on only about 1/4 of all requests.

Here's my init:

<script type="text/javascript"> 
tinyMCE.init({
    mode : "textareas",
    plugins : "paste,spellchecker, table",
    paste_auto_cleanup_on_paste : true,
    theme : "advanced",
    theme_advanced_buttons1 : "spellchecker,separator,pastetext,pasteword,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,开发者_如何学编程separator,code",
    theme_advanced_buttons2: "tablecontrols",
    theme_advanced_buttons3: "",
    theme_advanced_buttons4: "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    width : "700",
    height: "500"
});
</script> 


Do you include tinyMCE right before your initialization script? In some cases including tinyMCE after the init part might be the problem...


I don't know how in the world this could be related to my issue, but I haven't seen the problem reappear after I made a setting change in IIS. I added a web garden to handle load issues and this problem has not been seen since.

It's a purely anecdotal solution though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜