CKEditor.insertHtml 将 div 的内容从任何内容更改为 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://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>');
div 的内容变成带有 src="...ckeditor/images/spacer.gif?t=A73H4HC" 的
img 似乎有东西拦截 insertHtml
函数并替换传递的 div 的内容带有 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://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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已回复 http://cksource.com/forums/viewtopic.php? f=11&t=20216
Replied in http://cksource.com/forums/viewtopic.php?f=11&t=20216