TypeError:window.tinyMCE.get(...)为null

时间:2016-02-23 04:43:35

标签: wordpress tinymce editor

尝试在http://www.domaine-audubert.com上的可视化编辑器中编辑Wordpress页面时出现以下错误。

 TypeError: window.tinyMCE.get(...) is null


 window.tinyMCE.get( current_id ).setContent( content, {format: 'html'} );

错误似乎位于wp-content / plugins / fusion-core / admin / page-builder / assets / js / js-wp-editor.js?ver = 1.8.1(第173行第7行)< / p>

在该专栏中,我可以找到以下代码:

            $(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)

但我不知道错误来自哪里。这是一个常见问题,我该怎么办呢?

0 个答案:

没有答案