Skip to content
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

Buttons for setting image width to e.g. 50%, 75%, 100% #5201

Closed
Reinmar opened this issue Aug 28, 2019 · 3 comments · Fixed by #7482
Closed

Buttons for setting image width to e.g. 50%, 75%, 100% #5201

Reinmar opened this issue Aug 28, 2019 · 3 comments · Fixed by #7482
Assignees
Labels
intro Good first ticket. package:image type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@Reinmar
Copy link
Member

Reinmar commented Aug 28, 2019

In addition to the manual image resizing or as an alternative to it we can introduce a set of buttons which could be placed in the image toolbar and would allow to quickly change the width of an image to a predefined set of options.

E.g.

ClassicEditor.create( element, {
     image: {
          sizes: [ '50%', '75%', '100%' ],
          toolbar: [ 'textAlternative', '|', 'fullImage', 'sideImage', '|', 'imageSize50%', 'imageSize75%', 'imageSize100%' ],


          // or a dropdown:
          toolbar: [ 'textAlternative', '|', 'fullImage', 'sideImage', '|', 'imageSize' ]
     }
} )

This will be a nice extension of the image styles. By image styles you will control e.g. alignment and margins. And the size could be controlled by using the predefined options.

This way the developer will have control over what kind of images can be created (the content will be consistently styled), but the user will have more than one option of how wide the image should be.


If you'd like to see this option implemented please react with 👍 to this ticket.

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-image Oct 9, 2019
@mlewand mlewand added this to the nice-to-have milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:image labels Oct 9, 2019
@mlewand mlewand added the intro Good first ticket. label May 25, 2020
@jodator jodator modified the milestones: nice-to-have, iteration 33 May 27, 2020
@jodator
Copy link
Contributor

jodator commented May 29, 2020

It looks like linked to the #5197.

@oleq
Copy link
Member

oleq commented Jun 18, 2020

FYI: I'd see this implemented as a drop-down (to avoid bloating the image toolbar) but with individual buttons also available via component factory so if an integrator wants the buttons inline in the toolbar they'll be able to do this (similar to individual heading or highlight buttons that we already offer).

@Reinmar
Copy link
Member Author

Reinmar commented Jul 6, 2020

I reported a natural followup for this issue: #7560 – a ticket about cleaning up and clarifying the available options.

jodator added a commit that referenced this issue Jul 7, 2020
Feature (image): Introduced the UI for a manual image resizing via a dropdown or standalone buttons. Closes #5201.

Feature (image): Introduced the UI for restoring original image size.  Closes #5197.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. package:image type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants