Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atmajs/compo-highlight.js
https://github.com/atmajs/compo-highlight.js
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/atmajs/compo-highlight.js
- Owner: atmajs
- Created: 2016-01-04T14:41:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-08T13:01:40.000Z (over 8 years ago)
- Last Synced: 2024-10-15T09:31:00.951Z (about 1 month ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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'
}
```---