-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imageInsert and imageUpload commands should also accept singular params? #5174
Comments
Support for uploading multiple images in one command was introduced when we wanted to disable image upload when the image is selected. When we used the command for single images we were not able to do it because after the first image was uploaded the selection was moved on that image so you were not able to upload the next image.
I am fine with both options. We should have some global rules for such parameters and just follow them. AFAIR we already have some rules for options which can be singular or plural. |
So to referesh: The image upload (which was the only method to insert images back then) was changed to support multiple images due to a bug which disallowed to insert multiple images. Here is the long commented PR: ckeditor/ckeditor5-image#228. The |
The rule is, start with a singular, add support for plural (which often happens later), but don't make it plural then. That's for param names. Example – So, I think that both those commands should accept a param being a singular name ( |
Feature: Introduced the `'imageInsert'` command. Closes #245. Closes #251. BREAKING CHANGE: The `'imageUpload'` command's `files` parameter was renamed to `file`. It still can accept an array of files.
It's just so weird and unclear:
Did you think that it inserts a single image with multiple sources (i.e. a responsive image). Cause I did.
Initially
imageUpload
command accepted just a single file, but for some reason we needed it to accept multiple files. Now, theimageInsert
command follows that... and it's just confusing. What could help is if:The text was updated successfully, but these errors were encountered: