This file contains 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
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
var InnerBlocks = wp.editor.InnerBlocks; | |
var __ = wp.i18n.__; | |
var TEMPLATE = [ | |
[ 'core/paragraph', { placeholder: 'Paragraph 1', customFontSize: 76 } ], | |
[ 'core/paragraph', { content: 'Paragraph 2' } ], | |
]; |
This file contains 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
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
var InnerBlocks = wp.editor.InnerBlocks; | |
var TextControl = wp.components.TextControl; | |
var withSelect = wp.data.withSelect; | |
var __ = wp.i18n.__; | |
var TEMPLATE = [ | |
[ 'myplugin/child' ], | |
]; |
This file contains 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
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
var __ = wp.i18n.__; | |
var InspectorControls = wp.editor.InspectorControls; | |
var PanelColorSettings = wp.editor.PanelColorSettings; | |
var withColors = wp.editor.withColors; | |
var getColorClassName = wp.editor.getColorClassName; | |
function getClassNameString( backgroundColorClass, textColorClass ){ |
This file contains 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
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
var InnerBlocks = wp.editor.InnerBlocks; | |
var __ = wp.i18n.__; | |
var TEMPLATE = [ | |
[ 'core/paragraph', { placeholder: 'Paragraph 1', customFontSize: 35 } ], | |
]; | |
registerBlockType( 'myplugin/test-inner-paragraph', { |
This file contains 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
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
var InnerBlocks = wp.editor.InnerBlocks; | |
var __ = wp.i18n.__; | |
var ALLOWED_BLOCKS = [ | |
'core/image', | |
'core/button', | |
]; | |
var TEMPLATE = [ |
This file contains 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
( function() { | |
var COLORS = [ { | |
slug: 'green', | |
name: 'Green', | |
color: '#00ff00' | |
},{ | |
slug: 'yellow', | |
name: 'Yellow', | |
color: '#ffff00' | |
} ]; |
This file contains 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
( function() { | |
var COLORS = [ { | |
slug: 'green', | |
name: 'Green', | |
color: '#00ff00' | |
},{ | |
slug: 'yellow', | |
name: 'Yellow', | |
color: '#ffff00' | |
} ]; |
This file contains 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
( function() { | |
const { registerBlockType } = wp.blocks; | |
const { createElement: el } = wp.element; | |
const { InnerBlocks } = wp.editor; | |
registerBlockType( 'acme/product', { | |
title: 'Product', | |
icon: 'carrot', | |
category: 'common', |
This file contains 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
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
registerBlockType( 'test/raw-handler', { | |
title: 'Test Raw Handler', | |
icon: 'cart', | |
category: 'common', | |
attributes: { | |
text: { |
This file contains 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
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
var InnerBlocks = wp.editor.InnerBlocks; | |
registerBlockType( 'test/parent', { | |
title: 'Test Parent', | |
icon: 'cart', | |
category: 'common', |