Title: Crayon code is generated for every post
Last modified: August 20, 2016

---

# Crayon code is generated for every post

 *  Resolved [Andrew Biss](https://wordpress.org/support/users/andrewpaulbiss/)
 * (@andrewpaulbiss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/crayon-code-is-generated-for-every-post/)
 * Hi,
 * I was expecting that only the posts that contained Crayon shortcodes or `<pre
   >` tags would add the Crayon CSS, HTML and Javascript into the generated source.
   In practice it looked like the Crayon code was being generated into every post
   on my site.
 * My first thought was the **Misc** option _Attempt to load Crayon’s CSS and JavaScript
   only when needed_. Some testing showed that even when I enabled this option I
   was still getting code added to every post on the site.
 * Rather, the extra code was being generated because the **Tag Editor** option 
   _Display the Tag Editor in any TinyMCE instances on the fronted_ was defaulting
   to True. I disabled this option and the Crayon code was now only generated for
   posts which actually needed syntax highlighting, which is naturally a lot more
   efficient.
 * For reference I now have these settings:
    - _Attempt to load Crayon’s CSS and JavaScript only when needed_ = True
    - _Display the Tag Editor in any TinyMCE instances on the fronted_ = False
    - _Display Tag Editor settings on the frontend_ = False
 * My question is whether or not it’s a good idea to default the _Display the Tag
   Editor in any TinyMCE instances on the fronted_ option to True for a fresh install?
 * How many people trying out this plugin are going to have TinyMCE instances in
   their front-end posts which need syntax highlighting support?
 * My suggestions:
    1. Change the default to False for new installs
    2. Add a documentation link to explain what this option does and why you might 
       want to use it
 * Thanks and best regards,
 * Andrew.
 * [http://wordpress.org/extend/plugins/crayon-syntax-highlighter/](http://wordpress.org/extend/plugins/crayon-syntax-highlighter/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [akarmenia](https://wordpress.org/support/users/akarmenia/)
 * (@akarmenia)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/crayon-code-is-generated-for-every-post/#post-3130987)
 * Thanks Andrew, that’s a good idea. I had that setting to true because for most
   people getting it to work is more important than making the site more efficient(
   while both are very important!). However, since the tag editor needs more resources(
   fancybox being one) I agree it’s a better idea to disable it for new installs
   and mention it in the documentation.
 * [http://ak.net84.net/crayon/crayon-with-bbpress/](http://ak.net84.net/crayon/crayon-with-bbpress/)
 * I’ve disabled it by default in the latest 1.15 beta release.

Viewing 1 replies (of 1 total)

The topic ‘Crayon code is generated for every post’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/crayon-syntax-highlighter_b0c4c0.
   svg)
 * [Crayon Syntax Highlighter](https://wordpress.org/plugins/crayon-syntax-highlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/crayon-syntax-highlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/crayon-syntax-highlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/crayon-syntax-highlighter/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [akarmenia](https://wordpress.org/support/users/akarmenia/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/crayon-code-is-generated-for-every-post/#post-3130987)
 * Status: resolved