It is not possible to have code blocks containing MODX tags. Even custom TinyMCE configurations with FixedPre don't work in many cases. For one thing, TinyMCE still inserts line breaks wherever it thinks they should be, and content visibility varies from Fred views to visitor view.
Since articles and tutorials about MODX need to be able to display code containing MODX tags without those tags being processed, it would be nice to have such a feature. As things stand now, I'm having pages with such code use a non-Fred template so I can use FixedPre, or else use screen capture images of the code.
Bruno17 has provided an elegant and very easy to use plugin and javascript combination for this, but it still would be an appropriate feature to have built-in.
It is not possible to have code blocks containing MODX tags. Even custom TinyMCE configurations with FixedPre don't work in many cases. For one thing, TinyMCE still inserts line breaks wherever it thinks they should be, and content visibility varies from Fred views to visitor view.
There is the possibility that a TinyMCE plugin using Prism could work; ContentBlocks has a code input block using Ace and Prism available. https://docs.modmore.com/en/ContentBlocks/v1.x/Tips_Tricks/Displaying_MODX_Code.html
Since articles and tutorials about MODX need to be able to display code containing MODX tags without those tags being processed, it would be nice to have such a feature. As things stand now, I'm having pages with such code use a non-Fred template so I can use FixedPre, or else use screen capture images of the code.