getkirby / editor

A new type of WYSIWYG editor for Kirby
https://getkirby.com
205 stars 28 forks source link

Image settings #129

Open nilshoerrmann opened 4 years ago

nilshoerrmann commented 4 years ago

The more I'm using the Editor the more I think the image block misses the oportunity to integrate with the rest of the panel more solidly. On first sight, having a caption field right below the image looks great. But usually there are more settings needed to display images correctly on the front-end: there might be simple things like adding a copyright or and alternative text, but there might also be more complex things like setting the focus point of the image to display correctly in responsive layouts.

So my first thought was there needs to be a way to extend the image settings dialog:

Bildschirmfoto am 2019-10-15 um 11 10 23

But thinking about it, things should work the other way around: Kirby does already offer a better view for images and I think the Editor should make use of this view and link to it.

mrflix commented 4 years ago

It would be great, if clicking the image linked to Kirby's image view.

I like this idea. Binding the click to open details like it happens when clicking files in the files section sounds reasonable.

It would be great, if clicking the "Add a caption" text linked to Kirby's image view to edit the caption there.

This would be misleading. I think for most cases the optional caption is sufficient so it should stay there. For advanced cases caption: false or a caption: {{ file.description }} by {{ file.author}} could be a solution. The later would have to turn the caption into an text output that would have to look different so that people won't try to edit it.

nilshoerrmann commented 4 years ago

I like that :+1:

luxlogica commented 4 years ago

TBH, we hardly ever have a layout with 'captions'. I can think of perhaps one single website that needed to use captions in the last 3 years. What we do use on just about every single image, is:

Also, for images that the client inserts in the middle of body text flow, we often give the client the ability to set alignment ('left', 'right' or 'centre') via a CSS class (if using a textarea) or via a select menu in the image view. None of this seem easy (or possible) currently with the Image block in the Editor.

luxuryluke commented 4 years ago

I, for one, utilize image captions on most of my sites, for what it's worth. I like these ideas.

brianliddell commented 4 years ago

In my former life in print and advertising, captioned images were seen as a vital tool for communicating complex messages — as stage-by-stage instructions, illustrated selling points, or as a faster and better alternative to the main text. So I’m surprised how under-utilised captions are on the web.

I’m looking to move from CraftCMS to Kirby. I make heavy use of image captions, and image positioning fields. So I hope that Kirby’s new Editor will add a robust and flexible way to add caption and custom fields.

Maybe there could be an option to choose either the ‘default caption’ from the Image view, or a ‘custom caption’ to be entered.

bastianallgeier commented 4 years ago

@brianliddell that's already possible. The image block has support for captions, alt text and css selectors. If you need more than that you can set a file template for each included image and use that to add additional custom fields.

tusamni commented 4 years ago

@brianliddell you can set a file template for each included image and use that to add additional custom fields.

Any chance you can expand more on this? I was hoping for the same thing as nilshoerrmann. We'd be able to add an image to the Editor, then create a new snippet for the image tag and access the settings in the image's .jpg.txt file.