[wp-trac] [WordPress Trac] #21812: Make custom TinyMCE views easier to implement
WordPress Trac
wp-trac at lists.automattic.com
Fri Oct 12 18:49:33 UTC 2012
#21812: Make custom TinyMCE views easier to implement
----------------------------+---------------------
Reporter: koopersmith | Owner: azaozz
Type: task (blessed) | Status: closed
Priority: high | Milestone: 3.5
Component: TinyMCE | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch |
----------------------------+---------------------
Comment (by azaozz):
Small improvement for [22210], we don't need to do this "by hand":
{{{
isView : function( node ) {
return (/(?:^|\s)wp-view-wrap(?:\s|$)/).test( node.className );
},
}}}
Can use `ed.dom.hasClass(node, 'class-name')` or if it needs regex perhaps
this:
{{{
isView : function( node ) {
return /\bwp-view-wrap\b/.test( node.className );
},
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21812#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list