This screen is confusing or doesnt do what I thought it would do.
Enter an Image class AND a figure class
Expected result. that the image would be inserted with that image class and then wrapped in a figure element with the figure class
Actual result. The image is inserted with the image class only and no figure element
Enter a figure class
Expected result. that the image would be inserted and then wrapped in a figure element with the figure class
Actual result. The image is inserted with no class or figure element
The image is ONLY wrapped in a figure element when there is a figure caption. So the figure class is completely ignored in all other uses.
Maybe the results are what a well educated person would expect. I didn't and thought the code was broken. It should be much clearer that the figure element is only created when there is a figure caption AND so there is no point adding a figure class if you dont have a figure caption.
Also when the figure element is not created then anything entered as a figure class is lost forever
(updated)
Now it becomes more clear and more confusing.
When you add an intro or full image then you dont get asked for a figure class at all. As you can see you are only asked for an image class and a caption.
So based on the experience from Part 1 I expect that if I only add a caption then a figure element will wrap the image and caption.
And I expect that if I only add an image class then the image will be inserted with an image element and class only.
What actually happens is that the image is inserted without the class but it is wrapped in a figure element that is using the image class.
updated again
Because of the behaviour in part 2 it is not possible to use many of the bootstrap image classes. There is for example no way to center a figure element using a bs image class.
Labels |
Added:
No Code Attached Yet
|
@brianteeman What is a figure class?
A css class that would be added to the figure element
Am I really the only one who sees the inability to add an image class to an intro or full image as being a real difficulty - its hitting me really hard
Finally someone says it .. I thought it is only me.
So how dowe move forward
First part:
I would like to always have a figure around images, also if there is no caption. This makes styling much easier. Maybe there are disadvantages? @dgrammatiko?
I'll make a draft PR so we can discuss.
Fwiw the logic for the figure seems a bit odd now that I see it in action and it’s my fault. The image selector has already the state of the class AND the caption text so it should be fairly easy to change the conditional to append a figure even if the caption is empty if a class is defined
only a bit odd ;)
Labels |
Added:
?
|
Running into this exact issue.
The full text image class doesn't add the class to the image but to the wrapped figure class. This leads to unexpected issues when (in my case) external glighbox script that automatically adds a lightbox / gallery to (image) elements that have a configured class.
Currently although it says 'IMAGE class' the class is not added to the image, but to the wrapping figure element, leading to issues and the inability to (in my use case) add the lightbox to the image.
My proposal would be to rename (for B/C reasons), the image class to figure class and add an additional image class that will actually do what it is supposed to do (add the configured class to the image).
as for above part 1: totally agree, you either insert an image or a figure holding the image, now you have conditional output depending on what class you configure where, where the figure class doesn't do anything if the caption is empty. This is IMO a scenario for messy workarounds by (extension) developers
@brianteeman What is a figure class?