WordPress.org

Ready to get started?Download WordPress

Forums

Extend KSES
TinyMCE Visual tab keeps stripping iframe tag (1 post)

  1. RavanH
    Member
    Posted 3 years ago #

    Hi,

    In spite of the checked option for iframe (full support) using the Visual tab in TinyMCE / RTE / rich text editor will result in the Google Maps "embed code" iframe being stripped out.

    I realize KSES is about what is alowed by WordPress to be saved as post/page content but this plugins description suggest that it will make TinyMCE not strip it either. This is not the case...

    Steps to reproduce:
    1. Activate Extend KSES and check iframe (full support)
    2. Go to Google Maps and get an iframe embed code for any map
    3. Edit a post in HTML view and paste that code in content
    4. Switch to Visual view and see the map being rendered inside the content pane
    5. Switch back to HTML view and notice the iframe has been stripped!

    To make TinyMCE not strip iframe stuff, I found some helpfull code suggested by user:eswhite at the end of http://wordpress.org/support/topic/google-maps-iframe-deleted-with-tinymce-and-advanced-tinymce (closed thread)

    add_filter('tiny_mce_before_init', create_function( '$a','$a["extended_valid_elements"] = "iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]"; return $a;') );

    The code pasted in functions.php works. Maybe it can be used in this plugin too? To make it do what it says on the box, so to speak ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic