问题
=)
I've built a function that uploads,converts and then embeds a video into tinymce. Tinymce keeps wrapping my video embeds with some < object > html, using their moxieplayer.swf. I want to use custom videoplayers for these videos, but cant do that when tinymce behaves as it does.
This is the code im injecting to tinymce :
<video width="320" height="240" poster="5872deprivedwrath.jpg" preload="false" src="5872deprivedwrath.mp4">
<source type="video/mp4" src="5872deprivedwrath.mp4"><source type="video/ogv" src="5872deprivedwrath.ogv">
<object width="320" height="240" type="application/x-shockwave-flash" data="/js/flashmediaelement.swf">
<param name="movie" value="/js/flashmediaelement.swf">
<param name="flashvars" value="controls=true&file=5872deprivedwrath.mp4">
<img src="5872deprivedwrath.jpg" width="320" height="240" title="No video playback capabilities">
</object>
</video>
But when tinymce receives it, it turns into a big blob of html ( i can post that if needed ), wrapping it all in some moxieplayer flash embed.
<video width="320" height="240" poster="8910deprivedwrath.jpg" controls="controls" preload="preload">
<source src="8910deprivedwrath.mp4" type="video/mp4" /><source src="8910deprivedwrath.ogv" type="video/ogv" />
<object width="320" height="240" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
<param name="flashvars" value="url=8910deprivedwrath.mp4&poster=8910deprivedwrath.jpg" />
<param name="src" value="moxieplayer.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="true" />
<embed width="320" height="240" type="application/x-shockwave-flash" src="/tiny_mce/plugins/media/moxieplayer.swf" flashvars="url=8910deprivedwrath.mp4&poster=8910deprivedwrath.jpg" allowfullscreen="true" allowscriptaccess="true" />
</object>
</video>
So i'm trying to find out how to disable this function, or work around it.
Has anybody had any experience with this? Any input is greatly appreciated, as im struggling with this one!
回答1:
Set the following option in TinyMCE's config:
flash_video_player_url: false
来源:https://stackoverflow.com/questions/11429637/disabling-automatic-moxieplayer-wrap-in-tinymce