Visual template language?

Hello, I need to provide my users (lawyers) a way to create reusable tempates. thay need a basic stuff that typical template language (Twig etc.) provides so variables, conditionals (inline too), loops, not much more I think. Basically something like this, but more user friendly and usable by non-tech people.

I was thinking about Blockly (example), but it’s not that easy tbh, and it’s not oriented to text, after all its purpose is teaching programming.

Something like this would be best. Is there any ProseMirror plugin similar to that? Or how should I approach it in the first place, if writing from scratch - any hints? :slight_smile:

I’m not aware of a ProseMirror plugin that does this, but it’s definitely something that could be built on top of the library.