2012-03-20 75 views
1

我正在使用tinymce 3.4.9,我有一个问题。 当我插入了一个YouTube视频,我看到的视频已经被插入到textarea的,但是当我使用tinymce媒体插件

alert(tinyMCE.get('TextInp' id).getContent()); 

或者

alert(oTinyMCE.get('TextInp' id).getContent()); 

或者

alert($('#TextInp' id).html()); 

它的打印(作为警报)除了youtube嵌入的所有文本(我认为它应该是iframe)。它消失了。

我初始化这样TinyMCE的:

var oTinyMCE=new tinymce.Editor('TextInp' id, { 
      theme : "advanced", 
      theme_advanced_toolbar_location : "top", 
      theme_advanced_toolbar_align : alignMe , 
      width: MCEWidth, 
      height: MCEHeight, 
      relative_urls : false, 
      remove_script_host : false, 
      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,wordcount", 
      theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor", 
      theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,image,cleanup,|,insertdate", 
      theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media", 
      language: myLang, 
      directionality : dir 
     }); 
     oTinyMCE.render(); 

可以采取什么问题吗?

谢谢

回答

0

看起来你的标签被剥离了。您将不得不根据需要修改tinymce设置valid_elements和valid_children。

+0

对不起,但我不理解你。 我该怎么办? – Nir 2012-03-21 19:24:21

+0

我把代码放在'完整的XHTML规则集'下,并没有帮助。 – Nir 2012-03-21 19:36:32

+0

你在哪里把代码放在“完整的XHTML规则集”下? – Thariama 2012-03-22 09:20:30