WordPress.org

Forums

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

  1. Subharanjan
    Axelerant support
    Posted 2 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.

    http://wordpress.org/extend/plugins/crayon-syntax-highlighter/

  2. akarmenia
    Member
    Plugin Author

    Posted 2 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
    Member
    Plugin Author

    Posted 2 years ago #

    I've added it in this commit:

    https://github.com/aramkocharyan/crayon-syntax-highlighter/commit/2ab6afe6c81ba7fd101dc7398e256fbec9b10bfe

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

  4. Subharanjan
    Axelerant support
    Posted 2 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

Tags