0
我在使用tinymce在Wordpress中進行了一些自定義需求。它工作正常,但現在似乎拋出了我以前沒有的錯誤。TypeError:tinymce.get(...)爲空 - 似乎沒有正確查找ID
從螢火蟲:
TypeError: tinymce.get(...) is null
geqqo_new: tinymce.get('geqqo-editor-new').getContent()
但是事情看起來完全合理的 - 因爲以前他們的工作 - 所以請仔細檢查我:
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>
因此,所有的考慮,爲什麼我會得到如上所述的錯誤?
此外,這是使用WordPress的tinymce功能,所以也許有一個曲線球被拋出截至這個最新版本?