2014-01-30 67 views
0

下非常适用于Firefox和Chrome设置默认的内容...但不使用IE设置默认内容的TinyMCE不起作用在IE

<script type='text/javascript'> 
     function loadDefaultTinyMCEContent(){ 
      parent.tinyMCE.activeEditor.setContent('<p><a href=\"http://player.vimeo.com/video/80930543?autoplay=1#t=0m6s\" rel=\"nofollow\">dfgdsfgd</a></p><p><img src=\"uploads/2/Koala.jpg\" alt=\"Koala.jpg\" /></p>');} 
     </script> 

我得到在IE开发小组以下错误:

无法获取的udefined或空引用属性“setContent”。

这到底意味着什么?这里是我的tinymce初始化

tinymce.init({ 
    selector: 'textarea', 
    plugins: 'links link spellchecker lists paste snippet image moxiemanager table', 
    theme: "modern", 
    menubar: false, 
    toolbar1: "links | unlink | image | table", 
    toolbar2: " bold italic underline | bullist numlist | spellchecker | alignleft aligncenter alignright", 
    //width: 600, 
    height: 400, 
    invalid_elements : "h1,h2,h3,h4,h5,h6", 
    paste_as_text: true, 
    object_resizing : false, 
    advimagescale_max_width: 300, 
    entity_encoding : "raw" 

}); 

任何帮助,非常感谢。

回答

1

也许不是你有关于你可能已经发现了一个可能的IE漏洞后确切的答案。但是,你可能会更好过与文本区域已经包含要使用默认的HTML加载页面。在:

<textarea> 
    <p><a href=\"http://player.vimeo.com/video/80930543?autoplay=1#t=0m6s\" rel=\"nofollow\">dfgdsfgd</a></p><p><img src=\"uploads/2/Koala.jpg\" alt=\"Koala.jpg\" /></p> 
</textarea> 

我这样做,它似乎在IE中工作正常。

+0

此作品在一定程度上,除了有需要与像像撇号等...逃逸字符要处理的问题 –

+0

呀,采取点,对不起,我只是复制并从你的榜样粘贴 – 2potatocakes

相关问题