In the Editor plugin you could add custom css to images by typing classes into Images Settings (“Bildeinstellungen” in my görman version). That was a very important feature because it would empower users to have control over images on their site and prevent them from mess them up by just typing if it is a small, medium, big image. If it is with or without a shadow or rounded corners or or or.
Is there a way or a trick that I am not aware of, to add such classes to images in Kirbys new Blocks Editor?
I tried already. To reproduce the example in the docs, I made a folder in site/blueprints/blocks with a heading.yml in it and the same thing in site/snippets/blocks with a heading.php . That didn’t work. Gives me an internal server error:
The JSON response of the API could not be parsed:
Where am I to put the extension of the blueprint? It dosen’t say in the docs.
I tried putting it directly into the blueprint as well, but I got an error Gewitter. But - it was again my inability of correct indentation, that destroyed everything. I fail at indentation every single time. Is it true that in yml files one has to use spaces, not tabs?
I have a similar issue, and I managed to get as far as Ndugu has: CSS class to be entered through a text field. (Thanks for the explanation, everyone!)
What I would prefer though, is the possibility to limit the possible classes to a certain number accessible through a select menu.
I tried the select as well, decided against it but don’t remember why. Maybe it was because of commas in the classes in the html. Please share your experience/ solution.
Switching from the text based solution I adopted as a workaround to the select-based solution worked instantly, because the names of the classes was identical. I found the select fields already correctly selected.
Where did you come across commas? I simply insert the key in the options (the part before the colon) as the name of my class, and it works beautifully.
I wanted to be able to add several utility like classes and therefore I decided against the select. Then I tried the multiselect but that adds commas into the selector in the html. Anyway, my users don’t use one or the other… ;(