简体   繁体   English

将Flash嵌入到RTF编辑器中

[英]embedding flash in rich text editor

I've been trying to embed a flash widget inside a rich text editor ( http://code.google.com/p/lwrte/ ), by adding an tag to the iframe's HTML using mozilla's .insertHTML function ( http://www.mozilla.org/editor/midas-spec.html ), but for some reason it never shows up - using firebug i can see that the embed tag is there, but it has stripped out the closing tag. 我一直在尝试通过使用Mozilla的.insertHTML函数( http://将代码添加到iframe的HTML中),将Flash窗口小部件嵌入富文本编辑器( http://code.google.com/p/lwrte/ )中。 www.mozilla.org/editor/midas-spec.html ),但由于某些原因它从未显示-使用萤火虫,我可以看到embed标签在那里,但是它去除了结束标签。

any suggestions? 有什么建议么? how do other RTEs do this? 其他RTE如何做到这一点?

thanks 谢谢

IE and Firefox don't support Flash or any other plug-in inside an editable tag. IE和Firefox在可编辑标记内不支持Flash或任何其他插件。

What other editors (Like TinyMCE or CKEditor ) do is that they insert a placeholder image that gets replaced by the corresponding object/embed tags when the form is been submitted. 其他编辑器(例如TinyMCECKEditor )所做的是,他们插入了一个占位符图像,该图像在提交表单后将被相应的对象/嵌入标签替换。

For example, the placeholder image for CKEditor looks like this: 例如,CKEditor的占位符图像如下所示:

<img class="cke_flash"
    src="http://ckeditor.com/apps/ckeditor/3.0.1/images/spacer.gif?t=99GE"
    _cke_realelement="%3Ccke%3Aobject%20codebase%3D%22http%3A%2F(...)"
    alt="Flash Animation" _cke_real_element_type="flash"
    _cke_resizable="true"/>

As you can see they urlencode the entire object tag in the _cke_realelement attribute. 如您所见,他们在_cke_realelement属性中对整个对象标签进行了编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM