简体   繁体   中英

TypeError: tinymce.get(…) is null - Does not seem to be finding ID properly

I'm using tinymce in Wordpress for some custom needs. It was working fine yet now seems to be throwing an error that I previously did not have.

From Firebug :

TypeError: tinymce.get(...) is null

geqqo_new: tinymce.get('geqqo-editor-new').getContent()

However things look perfectly reasonable - they were working before - so please double check me:

JS :

tinymce.get('geqqo-editor-new').getContent() 

GENERATED HTML :

<form action="" method="post" target="_blank">
    <div id="wp-geqqo-editor-new-wrap" class="wp-core-ui wp-editor-wrap html-active">
        <link rel='stylesheet' id='editor-buttons-css'  href='http://localhost/hawaii/somelocal/wp-includes/css/editor.min.css?ver=3.9' type='text/css' media='all' />
        <div id="wp-geqqo-editor-new-editor-tools" class="wp-editor-tools hide-if-no-js">
            <div id="wp-geqqo-editor-new-media-buttons" class="wp-media-buttons"><a href="#" id="insert-media-button" class="button insert-media add_media" data-editor="geqqo-editor-new" title="Add Media"><span class="wp-media-buttons-icon"></span> Add Media</a></div>
            <div class="wp-editor-tabs"><a id="geqqo-editor-new-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">Text</a>
                <a id="geqqo-editor-new-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">Visual</a>
            </div>
        </div>
        <div id="wp-geqqo-editor-new-editor-container" class="wp-editor-container"><textarea class="wp-editor-area" rows="20" autocomplete="off" cols="40" name="content" id="geqqo-editor-new"></textarea></div>
    </div>
</form>

So with all considered, why am I getting an error such as stated above?

Also, this is using Wordpress's tinymce functionality, so perhaps there is a curve-ball being thrown as of this latest version?

Try these step by step and see if they fix the problem:

  1. Replace your existing theme with 2014

  2. Disable all plugins

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM