Skip to content

Instantly share code, notes, and snippets.

View felipelavinz's full-sized avatar

Felipe Lavín Z. felipelavinz

View GitHub Profile
@z3oc
z3oc / Firefox.MSEdge.smoothscroll
Created June 7, 2019 02:00
Firefox -> MS Edge flavor smooth scroll
general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS;250
general.smoothScroll.msdPhysics.enabled;true
general.smoothScroll.msdPhysics.motionBeginSpringConstant;450
general.smoothScroll.msdPhysics.regularSpringConstant;450
general.smoothScroll.msdPhysics.slowdownMinDeltaMS;50
@soderlind
soderlind / README.md
Last active September 11, 2024 08:30
WordPress: Add a media inserter to the block editor using the registerInserterMediaCategory

I did this to show how easy it is to create your own media inserter. In production I would create a a server that returns the json.

Install

  1. Create a block
    • in wp-content/plugins run npx @wordpress/create-block@latest my-image-inserter
    • cd my-image-inserter
  2. Copy index.js to my-image-inserter/src/index.js
  3. Delete my-image-inserter/my-image-inserter.php
  4. Copy plugin.php to my-image-inserter/plugin.php