stable
Clone or download
part of story #38627: Choice of a new Rich Text Editor This contribution introduces a new shortcut to the editor. This shortcut allows the user to open the toolbar's image menu by pressing the Ctrl+k keys. [bonus] When the link, image, edit link/ref menus open, their first inputs in their forms are now automatically focused. The code achieving this is in the lib @tuleap/tlp-popovers because we need to wait until popovers are shown before being able to focus what we need. [bonus 2] When the link or image menu is closed, the editor gets its cursor and focus back. How to test: - Click in an editor - Press Ctrl + k --> The image menu is open --> The "Image source" field is focused - Insert a new image then submit OR cancel --> The editor gets its cursor and focus back - Click on the link button --> Its menu opens --> The "Link" field is focused - Close it --> The editor gets its cursor and focus back - Open the edition form of a link --> Its "Link" field is focused - Open the edition for of a cross-reference --> Its "Reference" field is focused Change-Id: Ib26c36f734833d46562e41023b8cc0b589b5cce7
Modified Files
Name | ||||
---|---|---|---|---|
M | lib/frontend/prose-mirror-editor-toolbar/po/fr_FR.po | +2 | −2 | Go to diff View file |
M | lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/common/connect-popover.test.ts | +34 | −1 | Go to diff View file |
M | lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/common/connect-popover.ts | +10 | −1 | Go to diff View file |
M | lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image-button-template.ts | +1 | −1 | Go to diff View file |
M | lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image-popover-template.ts | +1 | −0 | Go to diff View file |
M | lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image.test.ts | +28 | −1 | Go to diff View file |
M | lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image.ts | +7 | −0 | Go to diff View file |
M | lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/link/link-popover-template.ts | +1 | −0 | Go to diff View file |
M | lib/frontend/prose-mirror-editor/src/plugins/link-popover/element/forms/EditCrossReferenceFormTemplate.ts | +1 | −0 | Go to diff View file |
M | lib/frontend/prose-mirror-editor/src/plugins/link-popover/element/forms/EditLinkFormTemplate.ts | +1 | −0 | Go to diff View file |
M | lib/frontend/prose-mirror-editor/src/plugins/toolbar/helper/toolbar-bus.ts | +12 | −1 | Go to diff View file |
A | lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/OpenImageMenuCommandBuilder.test.ts | +36 | −0 | Go to diff View file |
A | lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/OpenImageMenuCommandBuilder.ts | +34 | −0 | Go to diff View file |
M | lib/frontend/prose-mirror-editor/src/plugins/toolbar/index.ts | +2 | −0 | Go to diff View file |
M | lib/frontend/prose-mirror-editor/src/plugins/toolbar/keymap.ts | +4 | −1 | Go to diff View file |
M | lib/frontend/prose-mirror-editor/src/plugins/toolbar/mono-toolbar.ts | +3 | −0 | Go to diff View file |
M | lib/frontend/tlp-popovers/src/popovers.ts | +5 | −0 | Go to diff View file |
M | src/scripts/tlp-doc/stories/TLP/text-edition/prose-mirror-toolbar/toolbar-interactions-emulation.ts | +1 | −0 | Go to diff View file |