I like to implement a lightbox on my website. So far I have implemented the css and js files. So far no problem. But I want while writing an new post decide whether I like to link an image with lightbox or not. So I that I could insert a image with this code in the editor:
(image: test1.jpg)
But how can I now put a link arround this image with looks like this:
the link tag supports a class, role and rel attribute. otherwise you could always create a custom tag yourself to support the data-lightbox.
edited:
if you are using imageset plugin be aware that it comes with an enhanced image-tag. if you create your own tag you will lose that optimization.
thanks for your great help. I tried to modify yoour suggested code because I want to have one image in the article (perfect size et.) which is linked to a bigger sized pictured (same picture beat bigger).
my mistake. it should be image instead of images… see here
thats the p wrapper created by kirbytext. i do not know how to remove that in a non-hacky way. maybe adjust your css so it does not matter or if you need a list of images try using the ul/li element starting with a -. a list is easier to find and style with css than the p.