ReferenceError:未定义tinymce

时间:2018-06-12 01:09:48

标签: javascript php wordpress

当我去我的wordpress仪表板时。当我看到它在此代码上显示的错误时,我得到一个ReferenceError: tinymce is not defined

        <script type="text/javascript">
jQuery( function() {
    tinymce.on( 'AddEditor', function( event ) {
        event.editor.on( 'BeforeSetContent', function( event ) {
            var editor = event.target;
            Object.keys( editor.schema.elements ).forEach( function( key, index ) {
                editor.schema.elements[ key ].attributes['markdown'] = {};
                editor.schema.elements[ key ].attributesOrder.push( 'markdown' );
            } );
        } );
    }, true );
} );
</script>

这个代码上面包含了tinymce

<script type="text/javascript">
        tinyMCEPreInit = {
            baseURL: "https://my-url/wp-includes/js/tinymce",
            suffix: ".min",
                        mceInit: {},
            qtInit: {'replycontent':{id:"replycontent",buttons:"strong,em,link,block,del,ins,img,ul,ol,li,code,close"}},
            ref: {plugins:"",theme:"modern",language:""},
            load_ext: function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
        };
        </script>

我还从.htaccesswp-admin个文件夹中删除了wp-include个文件,但我仍然收到错误消息。任何想法如何解决这个问题?

0 个答案:

没有答案