0.8.14 • Published 8 years ago

compo-highlight.js v0.8.14

Weekly downloads
12
License
-
Repository
-
Last release
8 years ago

Highlight.js Component

Bower version Bower version

TagName

    Highlight

Attributes

NameRequiredDescription
langLanguage Syntax
tab-spacedDefault: 4. Replace tabs with spaces. Set 0 to disable

Install & Usage

  1. Install Highlight.js library.

  2. Install the component:

    # 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

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

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