javascript - Got a TypeError after update and need to adapt found solution

admin2025-06-02  2

I've recently updated my WP and I'm getting this error:

TypeError: switchEditors.switchto is not a function

I've found this:

This is due to changes to the core in Wordpress 4.3+. You need replace onclick="switchEditors.switchto(this);" to data-wp-editor-id="'+current_id+'"

Here is my code:

switchEditors.switchto( document.getElementById("ssquiz_question-tmce") );
if ( state == 'add') {...} 

I tried to adapt the line but can't get it to work. Any help will be great. Thanks in advance

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748818726a313983.html

最新回复(0)