The problem that WP Editor.md cannot be used after upgrading WordPress5.3

After upgrading WordPress5.3 WP-Editor.md The plug-in background editing function fails. The F12 view console has the following output: $ is not a function

reason

WordPress5.3 The background page releases the $ , use instead jQuery To call JQuery.
 JQuery
and WP-Editor.md Due to the use of $ The JS code after the error is reported stops executing, so the background editing function of the plug-in is invalid.

resolvent

Choose one of the following methods.

1. Redefine$

In the header of html <head> Redefine at $

 let $ = jQuery;

Untitled Spot_Untitled Station A finished plug-in has been written, which can bind this code to the corresponding function hook of WordPress. Please refer to the following link for details:

[jQuery-WP53-Fix]

2. Modify the $call in the plug-in

edit WP-Editor.md In plug-in src/Utils/Settings.php Line 91:

 jQuery( function() { $("#editor_mermaid\\\\[mermaid_config\\\\]")

Replace with

 jQuery( function() { jQuery("#editor_mermaid\\\\[mermaid_config\\\\]")

The solution comes from Github user sharpbai Reply on Github.

References

  1. [Github] sharpbai comment in WP-Editor.md/issues/380
  2. [Unnamed station] Passerby A jQuery-WP53-Fix
Zimiao haunting blog (azimiao. com) All rights reserved. Please note the link when reprinting: https://www.azimiao.com/5328.html
Welcome to the Zimiao haunting blog exchange group: three hundred and thirteen million seven hundred and thirty-two thousand

Comment

*

*

Comment area

  1. hare 02-14 17:04 reply

    The author of WP-EDITOR has updated the plug-in version. Please try to download the latest version in the plug-in store.