Create paragraph block
[MAILPOET-2614]
This commit is contained in:
@@ -15,6 +15,7 @@ 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';
|
||||
import * as paragraph from './paragraph/paragraph';
|
||||
|
||||
export const registerCustomFieldBlock = (customField) => {
|
||||
const namesMap = getCustomFieldBlocksSettings(customField);
|
||||
@@ -48,6 +49,7 @@ export const initBlocks = () => {
|
||||
registerBlockType(addCustomField.name, addCustomField.settings);
|
||||
registerBlockType(columns.name, columns.settings);
|
||||
registerBlockType(column.name, column.settings);
|
||||
registerBlockType(paragraph.name, paragraph.settings);
|
||||
registerBlockType(heading.name, heading.settings);
|
||||
|
||||
if (Array.isArray(customFields)) {
|
||||
|
@@ -8,10 +8,12 @@ const settingsReset = {
|
||||
deprecated: null,
|
||||
save: () => null,
|
||||
};
|
||||
|
||||
const settings = {
|
||||
...heading.metadata,
|
||||
...heading.settings,
|
||||
...settingsReset,
|
||||
category: 'layout',
|
||||
};
|
||||
|
||||
export { settings };
|
||||
|
18
assets/js/src/form_editor/blocks/paragraph/paragraph.tsx
Normal file
18
assets/js/src/form_editor/blocks/paragraph/paragraph.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import * as paragraph from '@wordpress/block-library/build-module/paragraph/index.js';
|
||||
|
||||
export const name = 'core/paragraph';
|
||||
|
||||
const settingsReset = {
|
||||
name,
|
||||
examples: null,
|
||||
deprecated: null,
|
||||
save: () => null,
|
||||
};
|
||||
const settings = {
|
||||
...paragraph.metadata,
|
||||
...paragraph.settings,
|
||||
...settingsReset,
|
||||
category: 'layout',
|
||||
};
|
||||
|
||||
export { settings };
|
Reference in New Issue
Block a user