Closed bnomei closed 5 years ago
the original usecase is that i am trying to use my custom kirbytag 'srcset'. i dont want to rebuild all html. reusing the kribytag and markdown is more DRY.
You can do that in your block, but for the native blocks it doesn't really make sense.
like i said above the editors php implementation of the image tag currently recreates the code the core kirbytag for image can already do. all you need to do is forward the props to the kirbytag helper. i do not understand your reasoning why having a less complete code this is better than reusing existing code - but its your call in the end. 🤷♂
would it be possible or even simpler to reuse the image kirbytag to render the html in the snippet? https://github.com/getkirby/editor/blob/master/snippets/image.php
this should work since its defined here, right? https://github.com/getkirby/editor/blob/master/lib/ImageBlock.php#L34