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

Changing the orientation of the side image icon #5114

Closed
wwalc opened this issue Aug 30, 2017 · 2 comments · Fixed by ckeditor/ckeditor5-image#140
Closed

Changing the orientation of the side image icon #5114

wwalc opened this issue Aug 30, 2017 · 2 comments · Fixed by ckeditor/ckeditor5-image#140
Assignees
Labels
package:image type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@wwalc
Copy link
Member

wwalc commented Aug 30, 2017

It may be a bit related to ckeditor/ckeditor5-image#134.

What if a developer sets the style of .image-style-side to float: left;. Is there a way to change the sideIcon from object-right.svg to object-left.svg when using a CKEditor build?

@fredck
Copy link
Contributor

fredck commented Aug 30, 2017

It would be wonderful to have an easy configuration way to switch the icon with the left aligned one, if my website fits that. Something like this:

image-side-image-icon: 'right' (default) || 'left'

@oleq
Copy link
Member

oleq commented Aug 31, 2017

ATM it works like this https://github.com/ckeditor/ckeditor5-image/blob/master/src/imagestyle/imagestyleengine.js#L48.

We could make it a config option and handle it in the ImageStyleEngine:

import sideIconLeft from '@ckeditor/ckeditor5-core/theme/icons/object-left.svg';
import sideIconRight from '@ckeditor/ckeditor5-core/theme/icons/object-left.svg';
...
const sideIcons = { left: sideIconLeft, right: sideIconRight };
const sideIconConfig = editor.config.get( 'image.ui.sideIcon' );

// Allow the config value as 'left' or 'right' or '<svg>...</svg>'.
const sideIcon = sideIconConfig ? sideIcons[ sideIconConfig ] || sideIconConfig : sideIconRight;

...
    { 
        name: 'imageStyleSide', 
        title: t( 'Side image' ), 
        icon: sideIcon, 
        value: 'side', 
        className: 'image-style-side' 
    }

@oleq oleq self-assigned this Sep 12, 2017
szymonkups referenced this issue in ckeditor/ckeditor5-image Sep 21, 2017
Feature: Allowed customization of default image styles. Defined formatting–oriented styles. Simplified `config.image.styles` syntax. Closes #134. Closes #135.

BREAKING CHANGE: From now on, the `imageStyleFull` uses `object-full-width.svg` icon.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-image Oct 9, 2019
@mlewand mlewand added this to the iteration 12 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:improvement This issue reports a possible enhancement of an existing feature. package:image labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants