PHP code example of coderius / yii2-highlight-js

1. Go to this page and download the library: Download coderius/yii2-highlight-js library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

coderius / yii2-highlight-js example snippets


 coderius\yii2_highlight_js\HighlightWidget::begin();

 coderius\yii2_highlight_js\HighlightWidget::begin(
            [
                'customAsset' => \coderius\yii2_highlight_js\CustomExampleAsset::register($this),

            ]
        ); 


 HighlightWidget::begin([
    'theme' => 'Xcode',
    'customAsset' => \coderius\yii2_highlight_js\CustomExampleAsset::register($this),
    'css' => "pre{font-style: italic;}"//any string style css 
    'js' => "alert('ok');",
    'positionJs' => yii\web\View::POS_END,//default value is yii\web\View::POS_READY
]); 

php composer.phar