diff --git a/apps/www/src/config/customizer-items.ts b/apps/www/src/config/customizer-items.ts index f572ec38d2..03554dfe9d 100644 --- a/apps/www/src/config/customizer-items.ts +++ b/apps/www/src/config/customizer-items.ts @@ -39,7 +39,7 @@ import { KEY_NODE_ID } from '@udecode/plate-node-id'; import { KEY_NORMALIZE_TYPES } from '@udecode/plate-normalizers'; import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph'; import { KEY_RESET_NODE } from '@udecode/plate-reset-node'; -import { KEY_SELECT_ON_BACKSPACE } from '@udecode/plate-select'; +import { KEY_DELETE, KEY_SELECT_ON_BACKSPACE } from '@udecode/plate-select'; import { KEY_BLOCK_SELECTION } from '@udecode/plate-selection'; import { KEY_DESERIALIZE_CSV } from '@udecode/plate-serializer-csv'; import { KEY_DESERIALIZE_DOCX } from '@udecode/plate-serializer-docx'; @@ -957,6 +957,23 @@ export const customizerItems: Record = { badges: [customizerBadges.handler], route: customizerPlugins.media.route, }, + [KEY_DELETE]: { + id: KEY_DELETE, + npmPackage: '@udecode/plate-select', + pluginFactory: 'createDeletePlugin', + pluginOptions: [ + `options: {`, + ` query: {`, + ` allow: [`, + ` // ELEMENT_IMAGE, ELEMENT_HR`, + ` ],`, + ` },`, + `},`, + ], + label: 'Forward Delete Plugin', + badges: [customizerBadges.handler], + route: customizerPlugins.media.route, + }, [KEY_SINGLE_LINE]: { id: KEY_SINGLE_LINE, npmPackage: '@udecode/plate-break', diff --git a/apps/www/src/config/customizer-list.ts b/apps/www/src/config/customizer-list.ts index c7dc75b50b..d046aa42d4 100644 --- a/apps/www/src/config/customizer-list.ts +++ b/apps/www/src/config/customizer-list.ts @@ -39,7 +39,7 @@ import { KEY_NODE_ID } from '@udecode/plate-node-id'; import { KEY_NORMALIZE_TYPES } from '@udecode/plate-normalizers'; import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph'; import { KEY_RESET_NODE } from '@udecode/plate-reset-node'; -import { KEY_SELECT_ON_BACKSPACE } from '@udecode/plate-select'; +import { KEY_DELETE, KEY_SELECT_ON_BACKSPACE } from '@udecode/plate-select'; import { KEY_BLOCK_SELECTION } from '@udecode/plate-selection'; import { KEY_DESERIALIZE_CSV } from '@udecode/plate-serializer-csv'; import { KEY_DESERIALIZE_DOCX } from '@udecode/plate-serializer-docx'; @@ -117,6 +117,7 @@ export const customizerList = [ customizerItems[KEY_NORMALIZE_TYPES], customizerItems[KEY_RESET_NODE], customizerItems[KEY_SELECT_ON_BACKSPACE], + customizerItems[KEY_DELETE], customizerItems[KEY_SINGLE_LINE], customizerItems[KEY_SOFT_BREAK], customizerItems[KEY_TABBABLE], @@ -182,6 +183,7 @@ export const orderedPluginKeys = [ KEY_NORMALIZE_TYPES, KEY_RESET_NODE, KEY_SELECT_ON_BACKSPACE, + KEY_DELETE, KEY_SINGLE_LINE, KEY_SOFT_BREAK, KEY_TABBABLE, diff --git a/apps/www/src/config/descriptions.ts b/apps/www/src/config/descriptions.ts index 15ae6c19af..c469d429bd 100644 --- a/apps/www/src/config/descriptions.ts +++ b/apps/www/src/config/descriptions.ts @@ -37,7 +37,7 @@ import { KEY_NODE_ID } from '@udecode/plate-node-id'; import { KEY_NORMALIZE_TYPES } from '@udecode/plate-normalizers'; import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph'; import { KEY_RESET_NODE } from '@udecode/plate-reset-node'; -import { KEY_SELECT_ON_BACKSPACE } from '@udecode/plate-select'; +import { KEY_DELETE, KEY_SELECT_ON_BACKSPACE } from '@udecode/plate-select'; import { KEY_BLOCK_SELECTION } from '@udecode/plate-selection'; import { KEY_DESERIALIZE_CSV } from '@udecode/plate-serializer-csv'; import { KEY_DESERIALIZE_DOCX } from '@udecode/plate-serializer-docx'; @@ -94,6 +94,7 @@ export const descriptions: Record = { [KEY_RESET_NODE]: 'Reset the block type using rules.', [KEY_SELECT_ON_BACKSPACE]: 'Select the preceding block instead of deleting when pressing backspace.', + [KEY_DELETE]: 'Enable forward delete plugin', [KEY_SINGLE_LINE]: 'Restrict the editor to a single block.', [KEY_SOFT_BREAK]: 'Insert line breaks within a block of text without starting a new block.',