CKEditor.insertHtml changing contents of div from whatever into an img
var content = window.frames[i].document.getElementById("embed").value;
/*
content is: '<object width="480" height="385"><param name="movie"
value="http://www.youtube.com/v/mmYVsGa-uZ0?fs=1&hl=en_US"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="http:开发者_如何学JAVA//www.youtube.com/v/mmYVsGa-uZ0?fs=1&hl=en_US"
type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" width="480" height="385"></embed></object>'
*/
editor.insertHtml('<div class="media_embed">'+content+'</div>');
The content of the div becomes an img with src="...ckeditor/images/spacer.gif?t=A73H4HC"
Something seems to be intercepting the insertHtml
function and replacing the contents of the passed div with an img
... This means that I can't embed anything other than an image!
Thanks
Replied in http://cksource.com/forums/viewtopic.php?f=11&t=20216
精彩评论