How’s this for cool. It’s possible to embed Gutenberg into any backend plugin page, with a custom save callback. You can get access to the rendered Gutenberg HTML or raw blocks array to do fun things with. This is the minimal amount of code to render a functional Gutenberg Block Editor in the backend: The […]
Tag: javascript
How to hide street numbers from embedded Google Maps
Hiding street numbers is pretty easy. Just use this style code: [ { “featureType”: “administrative.land_parcel”, “stylers”: [ { “visibility”: “off” } ] } ] The full embed code would look something like this: View this gist on GitHub
jQuery Timepicker with unix epoch
The jQuery UI Timepicker is pretty cool. Adds a nice little time selector under the existing jQuery Date Picker calendar. I needed to read/write timestamps from fields like this: <input type=”text” name=”something” class=”date_time” value=”1477569840″> So I came up with this simple solution: $(‘.date_time’).each(function(){ // create a new hidden field for our epoch time storage. // copy […]