Hello all
I would like to allow my users to submit a block of code from a front-end form. I want the submission to respect whitespace, tabs, and all the various characters one might find in a code block. Extra points if a user can choose which language so syntax highlighting might work.
I’m hoping for something like this:
https://highlightjs.org/
Any ideas?
Thank you in advance
Warmly,
Bill
Sure thing, Bill! Mentioned it in Slack, but posting here for Google-ability. You can use bbcode-like code blocks, and specify the syntax grammar to use for highlighting purposes. This works great with drop-in highlighters like highlight.js but you have options! See the docs section: Syntax Highlighting.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.