[wp-trac] [WordPress Trac] #12048: <video> tag is deleted when switching between Visual/HTML editors.

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 27 01:44:07 UTC 2010


#12048: <video> tag is deleted when switching between Visual/HTML editors.
-------------------------+--------------------------------------------------
 Reporter:  cabel        |       Owner:                
     Type:  enhancement  |      Status:  new           
 Priority:  normal       |   Milestone:  Future Release
Component:  Editor       |     Version:  2.9.1         
 Severity:  normal       |    Keywords:  tinymce       
-------------------------+--------------------------------------------------
Changes (by azaozz):

  * priority:  high => normal
  * type:  defect (bug) => enhancement
  * severity:  major => normal
  * milestone:  Unassigned => Future Release


Comment:

 The problem is that most currently used browsers do not support HTML 5 yet
 (IE, older FF and WebKit, etc.) so if you add <video> or <audio> tags most
 visitors to the site won't see them.

 Currently the visual editor uses XHTML 1 doctype and tags. There is an
 update in the works for it to support some HTML 5 tags that should be
 available soon. If you want to experiment with <video> now, I'd suggest
 adding a small plugin:
 {{{
 <?php

 add_filter('tiny_mce_before_init', 'my_video_tags');
 function my_video_tags($settings) {
   if ( !empty($settings['extended_valid_elements']) )
     $settings['extended_valid_elements'] .= ',';
   else
     $settings['extended_valid_elements'] = '';

   $settings['extended_valid_elements'] .= 'video[*],audio[*]'; // add
 other HTML 5 tags as needed

   return $settings;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12048#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list