I am getting the following error when trying to edit a WordPress page in visual editor on http://www.domaine-audubert.com.
TypeError: window.tinyMCE.get(...) is null
window.tinyMCE.get( current_id ).setContent( content, {format: 'html'} );
The error seems to be located in wp-content/plugins/fusion-core/admin/page-builder/assets/js/js-wp-editor.js?ver=1.8.1 (line 173 col 7)
In that column I can find this code:
$(self).before('<link rel="stylesheet" id="editor-buttons-css" href="' + fusionb_vars.includes_url + 'css/editor.css" type="text/css" media="all">');
$(self).before(wrap);
$(self).remove();
new QTags(current_id);
QTags._buttonsInit();
switchEditors.go(current_id, options.mode);
if( content && options.mode == 'tmce' ) {
setTimeout( function() {
window.tinyMCE.get( current_id ).setContent( content, {format: 'html'} );
}, 1000);
}
$(wrap).on( 'click', '.insert-media', function( event ) {
var elem = $( event.currentTarget ),
editor = elem.data('editor'),
options = {
frame: 'post',
state: 'insert',
title: wp.media.view.l10n.addMedia,
multiple: true
};
event.preventDefault();
elem.blur();
if ( elem.hasClass( 'gallery' ) ) {
options.state = 'gallery';
options.title = wp.media.view.l10n.createGalleryTitle;
}
wp.media.editor.open( editor, options );
//hide insert from URL
$('.media-menu a:contains(Insert from URL)').remove();
});
}
});
}
})( jQuery, window )
But I have no idea where the error comes from. Is this a common problem and what can I do about it?