stable

Clone or download

Read-only

feat: have an edit|create image button and popover in toolbar

part of story #38627 Choice of a new Rich Text Editor In this contribution, the image button and its popover are added to the toolbar. It allows the user to insert a new image, or to edit an existing one. Note: The check contained in CheckCanInsertImage is the old check that was made by the image plugin. It seems that it hardly prevent any insertion, and probably needs to be reworked. How to test: - Click somewhere in the editor, or select a portion of text - Click on the image button - Enter an url and a title - Save --> The image has been inserted - Click on the image you've just inserted --> The image button is in "active" mode - Click the image button --> The Image source and image title fields are filled with the image source and title - Update the title or the source or both - Save --> The image has been updated Change-Id: I66d2bd4398229dd4af921fc8f1762cd7b2f07816

Modified Files

Name
M lib/frontend/prose-mirror-editor-toolbar/po/fr_FR.po +15 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/common/connect-popover.test.ts +80 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/common/connect-popover.ts +53 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image-button-template.test.ts +64 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image-button-template.ts +38 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image-popover-template.test.ts +93 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image-popover-template.ts +104 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image.test.ts +48 −0 Go to diff View file
A lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/image/image.ts +85 −0 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/link/link.test.ts +4 −69 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/buttons/link/link.ts +21 −44 Go to diff View file
M lib/frontend/prose-mirror-editor-toolbar/src/elements/toolbar-element.ts +7 −1 Go to diff View file
M lib/frontend/prose-mirror-editor/po/fr_FR.po +0 −12 Go to diff View file
R lib/frontend/prose-mirror-editor/src/plugins/link-popover/helper/EditorNodeAtPositionFinder.test.ts Go to diff View file
R lib/frontend/prose-mirror-editor/src/plugins/link-popover/helper/EditorNodeAtPositionFinder.ts Go to diff View file
M lib/frontend/prose-mirror-editor/src/helpers/LinkPropertiesExtractor.test.ts +1 −1 Go to diff View file
M lib/frontend/prose-mirror-editor/src/helpers/LinkPropertiesExtractor.ts +1 −1 Go to diff View file
R lib/frontend/prose-mirror-editor/src/plugins/link-popover/helper/stubs/FindEditorNodeAtPositionStub.ts Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/link-popover/link-popover.ts +1 −1 Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/toolbar/helper/MonoToolbarActionActivator.ts +3 −0 Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/toolbar/helper/toolbar-bus.ts +9 −1 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/CanInsertImageChecker.ts +37 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageFromSelectionExtractor.test.ts +99 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageFromSelectionExtractor.ts +48 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageNodeInserter.test.ts +50 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageNodeInserter.ts +41 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageState.test.ts +55 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageState.ts +48 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageStateBuilder.test.ts +60 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/ImageStateBuilder.ts +45 −0 Go to diff View file
D lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/image-menu-item-builder.ts +0 −77 Go to diff View file
D lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/popover-image.test.ts +0 −60 Go to diff View file
D lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/popover-image.ts +0 −170 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/stubs/CheckCanInsertImage.ts +29 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/image/stubs/ExtractImageFromSelectionStub.ts +30 −0 Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/toolbar/index.ts +1 −0 Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/toolbar/menu.ts +0 −7 Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/toolbar/mono-toolbar.ts +12 −1 Go to diff View file
D lib/frontend/prose-mirror-editor/src/plugins/toolbar/popover/common-builder.test.ts +0 −45 Go to diff View file
D lib/frontend/prose-mirror-editor/src/plugins/toolbar/popover/common-builder.ts +0 −65 Go to diff View file
D lib/frontend/prose-mirror-editor/src/plugins/toolbar/popover/fields-adder.test.ts +0 −60 Go to diff View file
D lib/frontend/prose-mirror-editor/src/plugins/toolbar/popover/fields-adder.ts +0 −66 Go to diff View file
M lib/frontend/prose-mirror-editor/src/types/internal-types.ts +7 −2 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/toolbar/EditorToolbar.vue +1 −1 Go to diff View file