Last active
June 18, 2021 06:05
-
-
Save vishalkakadiya/7d1ee4e218f3c32f6b7b717b2daef3b2 to your computer and use it in GitHub Desktop.
FieldManager's Autocomplete, Datepicker and RichText_Area elements not working with Gutenberg block editor?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Below is the small trick to fix conflicts between FieldManager's Autocomplete, Datepicker and RichText_Area with Gutenberg block editor. | |
*/ | |
$( window ).load( function() { | |
// NOTE: This is fix for fieldmanager datepicker and autocomplete. | |
// Ref: https://github.com/alleyinteractive/wordpress-fieldmanager/issues/713 . | |
if ( typeof fm !== "undefined" ) { | |
if ( typeof fm.datepicker !== "undefined" ) { | |
fm.datepicker.add_datepicker(); | |
} | |
if ( typeof fm.autocomplete !== "undefined" ) { | |
fm.autocomplete.enable_autocomplete(); | |
} | |
if ( typeof fm.richtextarea !== "undefined" ) { | |
fm.richtextarea.add_rte_to_visible_textareas(); | |
} | |
} | |
} ); |
Works Great, thank you so much!
@yahilmadakiya I'm glad I able to help you! ๐
Added RichText Area's fix as well! ๐
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works Great, thank you so much!