We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Fieldtype for Statamic code

Curtis Blackwell December 9, 2014 by Curtis Blackwell

Last night I wrote an add-on that allows more flexibility with Statamic code in entries. Currently Statamic tags need to be wrapped in a fence or you won't be able to edit the entries in the CP (the code disappears). This can be annoying for people who prefer to indent or have a dedicated field for code that doesn't need to be parsed by Markdown && edit their entries.

I tweeted this image of the field before realizing exactly how prism.js works:

_cpb_2014-Dec-08.png

I need to use something else if code-coloring and other niceties are to be a part of it. My research brought me to CodeMirror and Ace. Does anyone have experience with both or either of these?

What do you dis/like about them? Know of something else that would be better-suited?

P.S.
This will be available for free on GitHub, once it's more than just a simple textarea that doesn't parse Statamic tags contained within.

>>>>>>> Unanswered <<<<<<<
0 Replies
1 Follower