Crayon Syntax Highlighter
[resolved] Capture code tags as Crayons (4 posts)

  1. Subharanjan
    Posted 3 years ago #

    Is it possible to capture the <code> tag as the container for code and highlight with Crayons. This is needed when a user submits code on comments they generally use <code> tag.


  2. akarmenia
    Plugin Author

    Posted 3 years ago #

    < code > looks distinct from a < pre > in that it's inline, but you can also enable the Tag Editor for use in the comments box by enabling TinyMCE in Crayon settings. This will let users add Crayons to their posts without typing html tags.

    If you really wanted to get < code > appearing like a Crayon, you'd need to write a filter to change it into a < pre > so Crayon can capture it as code. Of course, capturing them as inline Crayons is certainly an option. I'll look into it.

  3. akarmenia
    Plugin Author

    Posted 3 years ago #

    I've added it in this commit:


    It'll be released shortly with the next version. You can enabled it with the "Capture < code > as Inline Tags" setting.

  4. Subharanjan
    Posted 3 years ago #

    Thanks AK !!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Crayon Syntax Highlighter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic