Skip to content

srcset possible? #264

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

Closed
benblub opened this issue Sep 3, 2016 · 9 comments
Closed

srcset possible? #264

benblub opened this issue Sep 3, 2016 · 9 comments

Comments

@benblub
Copy link

benblub commented Sep 3, 2016

Wanted use srcset, is there a way to generate srcsets after upload Images?

tried with autoresize to generate more then 1 Image but it resized only the orginal pic.

resize1:
                  driver: LocalFileSystem
                  path: uploads
                  plugins:
                      AutoResize:
                          enable: true # For control by volume driver
                          maxWidth: 800 # Path to Water mark image
                          maxHeight: 800 # Margin right pixel
                          quality: 95 # JPEG image save quality
                  upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
                  upload_deny: ['all']
                  upload_max_size: 2M
@helios-ag
Copy link
Owner

I think it don't possible with this plugins, only by overriding/adding own ones.

@benblub
Copy link
Author

benblub commented Sep 7, 2016

ok will try DI with your Events. i Post here my solution.

@helios-ag
Copy link
Owner

Would be great!

@benblub
Copy link
Author

benblub commented Sep 10, 2016

Ok i wrote a little Plugin which do the job.
https://github.com/benblub/ElFinder-Thumbnail-Plugin

Its not finished yet, update Code the days. (works very basicly)

@benblub
Copy link
Author

benblub commented Sep 10, 2016

Code updated, Pull Request created
Has you some input for me get Remove action and rename file action that the plugin will be trigger?

@benblub
Copy link
Author

benblub commented Sep 12, 2016

Want adding Styles / Classes with CKEditor, tried global

ivory_ck_editor:
    default_config: default
    configs:
        default:
            toolbar: [ [ "Bold", "-", "BulletedList", "-", "Link", "-", "Unlink", "-", "Image" , "-", "Maximize" ] ]
            filebrowserBrowseRoute: elfinder
            filebrowserBrowseRouteParameters:
                instance: default
                bodyClass:
                    enterMode: CKEDITOR.ENTER_DIV
    styles:
        my_styles:
            - { name: "CSS Style", element: "div", attributes: { class: "my_style" }}
            - { name: "CSS Style", element: "p", attributes: { class: "my_style" }}
            - { name: "CSS Style", element: "img", attributes: { class: "my_style" }}

or in the Form Type directly

'config' => array(
                    'stylesSet' => 'my_styles',
                    'filebrowserBrowseRoute' => 'elfinder',
                    'filebrowserBrowseRouteParameters' => array(
                        'instance' => 'default',
                        'homeFolder' => ''
                    ),
                ),
                'styles' => array(
                    'my_styles' => array(
                        array('name' => 'CSS Style', 'element' => 'img', 'attributes' => array('class' => 'my_style')),
                    )),

both want work and ideas?

@helios-ag
Copy link
Owner

Never used custom styles, but i think you should set styleSet option

#config.yml
...
ivory_ck_editor:
    default_config: default
    configs:
        default:
            stylesSet: "my_styles" #<<<
...

@benblub
Copy link
Author

benblub commented Sep 12, 2016

i tried, didnt work, will do later some more tests

@helios-ag
Copy link
Owner

Btw, i think its better to ask in ckeditor's repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants