WowPress-Tailwind/javascript/block-editor.js

34 lines
850 B
JavaScript
Raw Normal View History

2024-04-15 16:00:49 +02:00
/* global wp */
/**
* Block editor modifications
*
* This file is loaded only by the block editor. Use it to modify the block
* editor via its APIs.
*
* The JavaScript code you place here will be processed by esbuild, and the
* output file will be created at `../theme/js/block-editor.min.js` and
* enqueued in `../theme/functions.php`.
*
* For esbuild documentation, please see:
* https://esbuild.github.io/
*/
wp.domReady(() => {
/**
* Add support for Tailwind Typographys `lead` class via a block style.
*/
wp.blocks.registerBlockStyle('core/paragraph', {
name: 'lead',
label: 'Lead',
});
// Add additional block editor modifications here. For example, you could
// register another block style:
//
// wp.blocks.registerBlockStyle( 'core/quote', {
// name: 'fancy-quote',
// label: 'Fancy Quote',
// } );
});