We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Native field type for code snippets

Feature Requests

Rob Allen's avatar
Rob Allen
2,950 posts
6 years ago
Rob Allen's avatar Rob Allen

There may be an existing 3rd party fieldtype but it’d be good to have a native version.

Typical usage for posting code snippets in an entry. Right now it’s a pain having to encode various characters before adding to an existing field that you use for markup.

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

For now, how about using {textarea:form_prep}?

       
Rob Allen's avatar
Rob Allen
2,950 posts
6 years ago
Rob Allen's avatar Rob Allen

Ah that’s good, I must have glossed over that as it refers to “form”. Thanks Derek, A dedicated fieldtype would still be good 😉

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

Yeah it’s not it’s intended purpose and there are probably some things that a native “code sample” field could have added value for. But form prep will make sure that HTML characters are protected from rendering but displayed properly.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.