GithubHelp home page GithubHelp logo

beingsane / plg_system_codeprettify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phproberto/plg_system_codeprettify

0.0 1.0 0.0 152 KB

Code highlighting for Joomla! based on Google Code Prettify library

PHP 49.69% HTML 0.41% JavaScript 6.63% CSS 43.27%

plg_system_codeprettify's Introduction

Joomla! - Code prettify plugin

Version: 1.1.0

System plugin for code highlighting based on the Google Code Prettify library

See it in action in my blog. Sample article

Google Code Prettify features

  • Template support
  • Automatically language detection
  • Used by code.google.com and stackoverflow.com
  • More details in the project wiki

Joomla! plugin features

  • You can override / customise templates just copying them to your template folder
  • Uses standard javascript onload event so it works with jQuery, Mootools or any other library
  • It's only 14KB

Installation

  1. Download the plugin
  2. In plugin management search and enable the plugin codeprettify. You can also select the template there.
  3. Start using it!

Use

To start adding code you only need to create a <pre class="prettyprint"> block with your coding inside like:

<pre class="prettyprint"> // Required objects $app = JFactory::getApplication(); $db = JFactory::getDbo(); $jinput = $app->input; </pre>

Customise/create new templates

The easiest way to create a template is base it in any of the existing templates.

To do that copy the desired style from the folder:
media/codeprettify/styles

to the folder: template/YOUR_TEMPLATE/html/plg_system_codeprettify/styles

And then edit there to fit your needs. In the plugin settings your new template will be shown in the select list marked as (override)

plg_system_codeprettify's People

Contributors

phproberto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.