You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The enabled button suggests that some action (?) in the context of the selected image can be performed. But clicking it only uploads another image next to the selected one.
At the moment, if an object is selected, the image will be inserted after that object (note that image is not inserted in the position of the selection, but it uses findOptimalInsertionPosition util). If we decide that the button should be disabled on such a position, the command should do nothing. If we disable the button, but command.execute will still execute its action (and insert image after) it will be strange.
Also, I think that this behavior should not be limited to the image. I think it should work like this for inserting images on all objects, or even more generic, for inserting all objects (which uses findOptimalInsertionPosition) when an object is selected. So whenever an object is selected and I want to insert an object the button should be disabled.
Alternatively, we could replace one object with the other in such cases.
f we disable the button, but command.execute will still execute its action (and insert image after) it will be strange.
Actually the proposition is to disable command not the button so the command.execute() will not insert image. But yes - we should agree on how it will work.
Other: The ImageUploadCommand should check whether it can be executed in the selection context. Closes #225. Closes #227. Closes #235.
BREAKING CHANGE: The `options.file` property was renamed to options.files for 'imageUpload' command.
BREAKING CHANGE: The `options.insertAt` property for 'imageUpload' command was removed. The command will now use model's selection.
mlewand
transferred this issue from ckeditor/ckeditor5-image
Oct 9, 2019
The enabled button suggests that some action (?) in the context of the selected image can be performed. But clicking it only uploads another image next to the selected one.
It could be confusing IMO.
cc @dkonopka
The text was updated successfully, but these errors were encountered: