File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
field_types/multiline_field Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,24 @@ jQuery.mf_bind('add',function(){
33
44 if ( typeof tinymce !== 'undefined' ) {
55 for ( id in tinyMCEPreInit . mceInit ) {
6- init = tinyMCEPreInit . mceInit [ id ] ;
7- $wrap = tinymce . $ ( '#wp-' + id + '-wrap' ) ;
6+ if ( tinyMCEPreInit . mceInit . hasOwnProperty ( id ) ) {
7+ init = tinyMCEPreInit . mceInit [ id ] ;
8+ $wrap = tinymce . $ ( '#wp-' + id + '-wrap' ) ;
89
9- if ( $wrap . hasClass ( 'html-active' ) ) {
10+ if ( $wrap . hasClass ( 'html-active' ) ) {
1011 for ( id in tinyMCEPreInit . mceInit ) {
11- init = tinyMCEPreInit . mceInit [ id ] ;
12- tinymce . init ( init ) ;
12+ if ( tinyMCEPreInit . mceInit . hasOwnProperty ( id ) ) {
13+ init = tinyMCEPreInit . mceInit [ id ] ;
14+ tinymce . init ( init ) ;
15+ }
1316 }
1417
15- // yeah, I know, this is ugly but works :s
16- setTimeout ( function ( ) {
18+ // yeah, I know, this is ugly but works :s
19+ setTimeout ( function ( ) {
1720 jQuery ( "button#content-html" ) . click ( ) ;
18- } , 1500 ) ;
21+ } , 1500 ) ;
22+
23+ }
1924 }
2025 }
2126 }
You can’t perform that action at this time.
0 commit comments