Allow commonly used obsolete HTML5 attributes in TinyMCE, table[summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor] and a[name], fixes #22175
git-svn-id: http://core.svn.wordpress.org/trunk@22411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
28777ee3c4
commit
c09c079a6f
|
@ -144,6 +144,16 @@
|
|||
}
|
||||
});
|
||||
|
||||
// Add HTML5 obsolete attributes that are still in use.
|
||||
ed.onPreInit.add(function(ed) {
|
||||
// This list is taken from TinyMCE 3.5.7 getHTML5()
|
||||
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';
|
||||
// Additional table attributes from TinyMCE 3.5.7 getHTML4()
|
||||
ed.schema.addValidElements('table['+commonAttr+'|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor]');
|
||||
// Adds "name" for <a>
|
||||
ed.schema.addValidElements('a['+commonAttr+'|href|target|ping|rel|media|type|name]');
|
||||
});
|
||||
|
||||
ed.onInit.add(function(ed) {
|
||||
var bodyClass = ed.getParam('body_class', ''), body = ed.getBody();
|
||||
|
||||
|
|
Loading…
Reference in New Issue