Skip to content

Instantly share code, notes, and snippets.

@scottgruber
Last active November 10, 2015 17:43
Show Gist options
  • Save scottgruber/7625d65aea34b2a8b3db to your computer and use it in GitHub Desktop.
Save scottgruber/7625d65aea34b2a8b3db to your computer and use it in GitHub Desktop.
Perch template for Prism syntax highlighter
<pre>
<code class="<perch:content id="code_snippet" type="select" options="Markup|language-markup,CSS|language-css,JavaScript|language-javascript,SCSS|language-scss,PHP|language-php,Markdown|language-markdown,Git|language-git,Python|language-python,React JSX|language-jsx" label="Kind of code snippet" help="Select from the options what kind of code snippet this is so we can target an approate css selector." allowempty="true" />">
<perch:content id="textarea" type="textarea" label="Code" html="false" markdown="false" size="l" />
</code>
</pre>
@scottgruber
Copy link
Author

This is a simple Perch template to let an editor select and apply the correct css language declaration to an html code tag when using prism. Prism is a syntax highlighter recommended to me by several members of the Perch Slack Chat community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment