Add heading block
[MAILPOET-2613]
This commit is contained in:
@@ -14,6 +14,7 @@ import * as html from './html/html.jsx';
|
||||
import * as addCustomField from './add_custom_field/add_custom_field.jsx';
|
||||
import * as columns from './columns/columns.jsx';
|
||||
import * as column from './columns/column.jsx';
|
||||
import * as heading from './heading/heading.jsx';
|
||||
|
||||
export const registerCustomFieldBlock = (customField) => {
|
||||
const namesMap = getCustomFieldBlocksSettings(customField);
|
||||
@@ -47,6 +48,7 @@ export const initBlocks = () => {
|
||||
registerBlockType(addCustomField.name, addCustomField.settings);
|
||||
registerBlockType(columns.name, columns.settings);
|
||||
registerBlockType(column.name, column.settings);
|
||||
registerBlockType(heading.name, heading.settings);
|
||||
|
||||
if (Array.isArray(customFields)) {
|
||||
customFields.forEach(registerCustomFieldBlock);
|
||||
|
17
assets/js/src/form_editor/blocks/heading/heading.jsx
Normal file
17
assets/js/src/form_editor/blocks/heading/heading.jsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as heading from '@wordpress/block-library/build-module/heading/index.js';
|
||||
|
||||
export const name = 'core/heading';
|
||||
|
||||
const settingsReset = {
|
||||
name,
|
||||
examples: null,
|
||||
deprecated: null,
|
||||
save: () => null,
|
||||
};
|
||||
const settings = {
|
||||
...heading.metadata,
|
||||
...heading.settings,
|
||||
...settingsReset,
|
||||
category: 'layout',
|
||||
};
|
||||
export { settings };
|
Reference in New Issue
Block a user