0
Welcome Guest! Login
0 items Join Now

Code highlighter needed

    • JulesM's Avatar
    • JulesM
    • Jr. Rocketeer
    • Posts: 25
    • Thanks: 1

    Code highlighter needed

    Posted 14 years 8 months ago
    • Hi,

      I need to display code in my content. I have Rokpad but it seems its code highlighting function only pertains to the actual editing of content. I need to display highlighted code in the actual aritcles.

      Is there any specific extension in the Rok collection that would allow me to do this? If not, could you perhaps point me in the right direction?

      Thanks
    • Ben Harold's Avatar
    • Ben Harold
    • Sr. Rocketeer
    • Posts: 231
    • Thanks: 1
    • Freelance Developer

    Re: Code highlighter needed

    Posted 14 years 8 months ago
    • By "highlight code" do you mean something along the lines of this:
      <?php
      code goes in here...
      ?>
      Or do you mean something more along the lines of a highlighter on a piece of paper, i.e. changing the background color of a span?

      Also, are you looking to make this functionality automatic, or are you just looking for a style that you can use? In other words, are you looking for a plugin that modifies specific content upon document rendering, or are you content with just using span and or div tags?
    • JulesM's Avatar
    • JulesM
    • Jr. Rocketeer
    • Posts: 25
    • Thanks: 1

    Re: Code highlighter needed

    Posted 14 years 8 months ago
    • Hi Ben,

      Thanks for your reply.

      Yes. Something like your example. I found some documentation on RokCandy but to be honest with you I don't even know where to get started with it.

      The only functionality that I need is for the plugin/mod to be able to display simple snippets of code. Preferably html, css and some js.

      I must've tried at least 10 of them (codecitation, chilicode etc.) and couldn't find one that stayed true to its description.
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: Code highlighter needed

    Posted 14 years 8 months ago
    • Yeah, this is weird in the way it works with RokPad. You can use Codecitation, but you need to enter in the code highlighting part while in TinyMCE and then go back to the article and use RokPad for the rest.

      It's sort of a pain, but it does work this way.
    • JulesM's Avatar
    • JulesM
    • Jr. Rocketeer
    • Posts: 25
    • Thanks: 1

    Re: Code highlighter needed

    Posted 14 years 8 months ago
    • Hi Ben,

      Thank you for your reply. I really appreciate it. I've been fighting this for almost 2 days. If I could give you a medal, I would. Problem solved. Thanks mate.

Time to create page: 0.070 seconds