WordPress.org

Make WordPress Core

Changeset 22411


Ignore:
Timestamp:
11/06/12 23:36:10 (18 months ago)
Author:
azaozz
Message:

Allow commonly used obsolete HTML5 attributes in TinyMCE, table[summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor] and a[name], fixes #22175

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js

    r21415 r22411  
    143143                    } 
    144144                } 
     145            }); 
     146 
     147            // Add HTML5 obsolete attributes that are still in use. 
     148            ed.onPreInit.add(function(ed) { 
     149                // This list is taken from TinyMCE 3.5.7 getHTML5() 
     150                var commonAttr = 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup'; 
     151                // Additional table attributes from TinyMCE 3.5.7 getHTML4() 
     152                ed.schema.addValidElements('table['+commonAttr+'|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor]'); 
     153                // Adds "name" for <a> 
     154                ed.schema.addValidElements('a['+commonAttr+'|href|target|ping|rel|media|type|name]'); 
    145155            }); 
    146156 
Note: See TracChangeset for help on using the changeset viewer.