Skip to content

Instantly share code, notes, and snippets.

View rocketdevcorp's full-sized avatar

Félicette rocketdevcorp

View GitHub Profile
@rocketdevcorp
rocketdevcorp / footnote_bgcolor.js
Last active August 7, 2019 04:35
Footnote with background color: The basic footnote block uses the withColors HOC
( function( i18n, blocks, blockEditor, element, richText ) {
var el = element.createElement;
var __ = i18n.__;
var RichText = blockEditor.RichText;
// NEW ASSIGNMENTS
var Fragment = element.Fragment;
var InspectorControls = blockEditor.InspectorControls;
@rocketdevcorp
rocketdevcorp / footnote.js
Last active August 7, 2019 03:37
Footnote: A simple Gutenberg block using the RichText component
/* Footnote.js
*
* <div class="wp-block-myblocks-footnote">
* <p>Line 1</p>
* <p>Line 2</p>
* </div>
*/
( function( i18n, blocks, blockEditor, element, richText ) {