2017 © Pedro Peláez
 

yii2-extension yii2-code-prettify

Yii2 Code syntax highlighter based on Google-Code-Prettify library.

image

uran1980/yii2-code-prettify

Yii2 Code syntax highlighter based on Google-Code-Prettify library.

  • Saturday, March 7, 2015
  • by uran1980
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,181 Installations
  • CSS
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

Yii2 Code Prettify

Code syntax highlighting based on Google-Code-Prettify., (*1)

Installation

Composer

The preferred way to install this extension is through Composer., (*2)

Either run, (*3)

php composer.phar require uran1980/yii2-code-prettify "dev-master"

or add, (*4)

"uran1980/yii2-code-prettify": "dev-master"

to the require section of your composer.json, (*5)

Usage

To use this component add dependency to you project asset bundle. For example in ...\frontend\assets\AppAsset.php file add to dependency:, (*6)

<?php

namespace frontend\assets;

class AppAsset extends \yii\web\AssetBundle
{
    ...
    public $depends = [
        ...
        'uran1980\yii\assets\codePrettify\CodePrettifyAsset',
    ];
}

That's it. In the View add source code blocks like this:, (*7)

```html, (*8)

<script type="text/javascript">
    // Say hello world until the user starts questioning
    // the meaningfulness of their existence.
    function helloWorld(world) {
      for (var i = 42; --i >= 0;) {
        alert('Hello ' + String(world));
      }
    }
</script>
<style>
    p { color: pink }
    b { color: blue }
    u { color: "umber" }
</style>

Author

Ivan Yakovlev, e-mail: uran1980@gmail.com, (*9)

The Versions

07/03 2015

dev-master

9999999-dev https://github.com/uran1980/yii2-code-prettify

Yii2 Code syntax highlighter based on Google-Code-Prettify library.

  Sources   Download

MIT

The Requires

 

yii2 code prettify code syntax highlighter

07/03 2015

0.0.1

0.0.1.0 https://github.com/uran1980/yii2-code-prettify

Yii2 Code syntax highlighter based on Google-Code-Prettify library.

  Sources   Download

MIT

The Requires

 

yii2 code prettify code syntax highlighter

07/03 2015

0.0.2

0.0.2.0 https://github.com/uran1980/yii2-code-prettify

Yii2 Code syntax highlighter based on Google-Code-Prettify library.

  Sources   Download

MIT

The Requires

 

yii2 code prettify code syntax highlighter