I’ve adjusted a code example, as suggested by @texnixe, to replace some custom tags instead of using <div markdown="1" class="some-class"> which is great and indeed much more user friendly.
Now I’m making some code examples which obviously only display properly when I use some extra space. How can I prevent replacement when tags are wrapped in (or start) with ~~~ .
It’s a bit silly to add notes with every example to omit extra whitespace
Hmmm, I’m working on a theme and I have to play with the editor first and one of the good things about Kirby as I write somewhere is: “No quirky Wysiwig editor just text”
Fair enough…its awesome though! to give you and idea of its power, apart from the header and footer, this entire page is powered by a single editor field… https://theworkofothers.com/spotlight/davide-pelino
Another way to do what you want is to store the snippets on Github and use the gist kirby tag.
I’ve used a lot of them. It just feels (imho) wrong to try to create what is happening at the front in the back end. I’m sure the Kirby Editor is something else though.
If you extend the above slightly to pass through a filename and class, you can store the code snippets in text files and have the snippet render them where you want.
It’s different in that it creates structure content that you can access in many ways. Also, the markup for the frontend is totally under your control, you can adapt all snippets to your liking. It’s not fully WYSIWYG, either.
Have a look at it, especially for themes it might be a plus.
Still thinking that Kirby (2) would be great for the visually impaired. My daughter is blind and always wanted to see how she could work with just text files and markdown, something for another project …
Personally, I also love the simplicity of writing markdown and all the possibilities Kirbytext gives us for extending it with any kind of content we like. As I’ve written in other places, we create content for the getkirby.com website by editing text files (and auto-generating content), no Panel involved.