Skip to content

web component wrapper to highlight your code in any webpage using polymer

Notifications You must be signed in to change notification settings

deepak1556/highlight-code-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<highlight-code>

A web component wrapper to highlight code snippets in any webpage using highlighterJs.

Maintained by Robo.

Demo

Check it live.

Usage

  1. Import Web Components' polyfill:

    <script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.0.20130711/polymer.min.js"></script>
  2. Import Custom Element:

    <link rel="import" href="src/highlight.html">
  3. Start using it!

    <highlight-code></highlight-code>

Options

Attribute Options Default Description
height int 500 The height of snippet container
width int 500 THe width of snippet container
tabreplace string Overwrite default tab spaces '4'

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

License

MIT License

About

web component wrapper to highlight your code in any webpage using polymer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages