diff --git a/src/shared/components/BlockEditor/SlashMenu.client.js b/src/shared/components/BlockEditor/SlashMenu.client.js index 2deb9cf..23dc537 100644 --- a/src/shared/components/BlockEditor/SlashMenu.client.js +++ b/src/shared/components/BlockEditor/SlashMenu.client.js @@ -2,9 +2,24 @@ import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; -const MENU_WIDTH = 256; // w-64 -const MENU_MAX_HEIGHT = 288; // max-h-72 +const MENU_WIDTH = 280; +const MENU_MAX_HEIGHT = 320; const VIEWPORT_MARGIN = 8; + +const SHORTCUT_HINT = { + paragraph: '', + heading_1: '#', + heading_2: '##', + heading_3: '###', + heading_4: '####', + heading_5: '#####', + heading_6: '######', + bullet_item: '-', + numbered_item: '1.', + quote: '>', + code: '```', + divider: '---', +}; import { listBlocks } from './blockRegistry.js'; // Menu flottant des commandes. Affiché ancré à un élément (anchorRect). @@ -92,8 +107,8 @@ export default function SlashMenu({ if (items.length === 0) { return (