You can customize the filter of TinyMCE, see the following example for iframe
and other tags to use Google Maps inside TinyMCE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
function fb_change_mce_options( $initArray ) { // Comma separated string od extendes tags. // Command separated string of extended elements. $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]'; if ( isset( $initArray['extended_valid_elements'] ) ) { $ext = ',' . $ext; } $initArray['extended_valid_elements'] = $ext; // Maybe, set tiny parameter verify_html //$initArray['verify_html'] = false; return $initArray; } add_filter( 'tiny_mce_before_init', 'fb_change_mce_options' ); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.