简体   繁体   中英

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.

any suggestions? how do other RTEs do this?

thanks

IE and Firefox don't support Flash or any other plug-in inside an editable tag.

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.

For example, the placeholder image for CKEditor looks like this:

<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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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