Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atmajs/compo-highlight.js


https://github.com/atmajs/compo-highlight.js

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

## [Highlight.js](https://highlightjs.org/) Component

[![Bower version](https://badge.fury.io/js/compo-highlight.js.svg)](http://badge.fury.io/js/compo-highlight.js)
[![Bower version](https://badge.fury.io/bo/compo-highlight.js.svg)](http://badge.fury.io/bo/compo-highlight.js)

#### TagName

```mask
Highlight
```

#### Attributes

|Name | Required |Description|
|------|----------|:---------:|
|lang | ✓ | Language Syntax |
|tab-spaced | | Default: `4`. Replace tabs with spaces. Set `0` to disable |

#### Install & Usage

1. Install `Highlight.js` library.

2. Install the component:
```bash
# npm
npm install compo-highlight.js --save
#bower
bower install compo-highlight.js --save
```

3. Load `Highlight.js` library and `compo-highlight.js` component with resource loaders you use.

4. Usage

- _Mask syntax_

```mask
h4 > 'MaskJS syntax: '
Highlight lang='mask' > """
define Foo {
i > '~name'
}
"""
```

- _HTML mixed syntax_

```mask
h4 > 'MaskJS syntax: '

define Foo {
i > '~name'
}

```

---