FCK Editor 2.5.1 使用Flash有个BUG。重新步骤
1. 插入一个flash
2. 切换到代码试图,可以看到代码:<embed src="http://www.tudou.com/v/W9XqdOthNag" type="application/x-shockwave-flash" width="400" height="300" allowFullScreen="true" wmode="transparent" allowScriptAccess="always"></embed>
3.切换到html试图,选中这个flash对象,
4.切换到代码试图,发现代码里丢失了 type="application/x-shockwave-flash"
以上步骤多重复几次,即可重现。
经过测试,发现IE 在处理<embed 属性是是存在问题的。
测试的例子:
<
input id
=
"
gggg
"
type
=
"
button
"
value
=
"
test()
"
onclick
=
"
test()
"
/>
<
script
>
var
o
=
document.getElementById(
"
gggg
"
);
alert(o.getAttribute(
"
type
"
)); //返回button ,正确
alert(o.attributes[
"
type
"
].nodeValue); // //返回button ,正确
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
</
script
>
<
embed id
=
"
ffff
"
src
=
"
http://www.tudou.com/v/W9XqdOthNag
"
type
=
"
application/x-shockwave-flash
"
width
=
"
400
"
height
=
"
300
"
allowFullScreen
=
"
true
"
wmode
=
"
transparent
"
allowScriptAccess
=
"
always
"
></
embed
>
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
var
o
=
document.getElementById(
"
ffff
"
);
alert(o.getAttribute(
"
type
"
));
//
返回null 错误!!!
alert(o.attributes[
"
type
"
].nodeValue)
//
返回 application/x-shockwave-flash 正确
这个问题是导致FCKEditor 无法正确处理flash 的根本原因!!
http://www.fckeditor.net/forums/viewtopic.php?f=5&t=8158