简体   繁体   English

TypeError:tinymce.get(…)为空-似乎无法正确找到ID

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

I'm using tinymce in Wordpress for some custom needs. 我在Wordpress中使用tinymce来满足一些自定义需求。 It was working fine yet now seems to be throwing an error that I previously did not have. 它工作正常,但现在似乎抛出了我以前没有的错误。

From Firebug : 从Firebug

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

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

However things look perfectly reasonable - they were working before - so please double check me: 但是,事情看起来非常合理-他们以前工作过-因此请仔细检查我:

JS : JS

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

GENERATED HTML : 生成的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? 此外,这是使用Wordpress的tinymce功能,因此,从最新版本开始,可能会抛出曲线球吗?

Try these step by step and see if they fix the problem: 逐步尝试这些,看看它们是否解决了问题:

  1. Replace your existing theme with 2014 用2014替换现有主题

  2. Disable all plugins 禁用所有插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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