stable

Clone or download

Read-only

Extract another lib for ckeditor image upload

Part of story #18336 add support of markdown How to test: - No functional change in "Image drag/drop" feature in the Tracker Artifact view. It does not affect the Artifact modal. Notes: In order to provide a cleaner lib for CKEditor with markdown, we must first extract this part. It is very tied to the Artifact view form and how it functions, so in the future it may be moved to Tracker plugin instead of Tuleap core, but for now it must stay in core as long as RichTextEditor.js depends on it. Some code has been changed to use classes instead of top-level functions in order to leverage @tuleap/gettext lib (as libs can't do dynamic import). As a result of extracting this, there is no longer a need to add regenerator/runtime in @tuleap/core Jest tests. It is contained in this library now. The lib has not been converted to TypeScript yet because typing became too painful with CKEditor types. It should be done in a later contribution. Change-Id: I57f3f8c6299d1f256b326f4bb826b816d0cf5105

Modified Files

Name
M build-manifest.json +3 −3 Go to diff View file
M src/jest.config.js +0 −1 Go to diff View file
M src/package-lock.json +0 −5 Go to diff View file
M src/package.json +1 −2 Go to diff View file
M src/scripts/codendi/RichTextEditor.js +1 −4 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/.gitignore +1 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/README.md +10 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/jest.config.js +26 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/package-lock.json +29 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/package.json +28 −0 Go to diff View file
R src/scripts/tuleap/ckeditor/po/fr_FR.po Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/src/HelpBlockTranslator.js +46 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/src/HelpBlockTranslator.test.js +86 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/src/Initializer.js +101 −0 Go to diff View file
R src/scripts/tuleap/ckeditor/get-upload-image-options.test.js Go to diff View file
R src/scripts/tuleap/ckeditor/element-adapter.js Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/src/UploadEnabledDetector.test.js +59 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/src/ckeditor-options.js +32 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/src/ckeditor-options.test.js +55 −0 Go to diff View file
R src/scripts/tuleap/ckeditor/consistent-uploaded-files-before-submit-checker.js Go to diff View file
R src/scripts/tuleap/ckeditor/consistent-uploaded-files-before-submit-checker.test.js Go to diff View file
R src/scripts/tuleap/ckeditor/form-adapter.js Go to diff View file
R src/scripts/tuleap/ckeditor/form-adapter.test.js Go to diff View file
R src/scripts/tuleap/ckeditor/forms-being-uploaded-state.js Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/src/index.js +38 −0 Go to diff View file
R src/scripts/tests/jest.setup.js Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/webpack.common.js +43 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/webpack.dev.js +23 −0 Go to diff View file
A src/scripts/lib/ckeditor-image-upload-form/webpack.prod.js +23 −0 Go to diff View file
D src/scripts/tuleap/ckeditor/get-upload-image-options.js +0 −107 Go to diff View file